Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • PHP Tutorial
  • PHP Exercises
  • PHP Array
  • PHP String
  • PHP Calendar
  • PHP Filesystem
  • PHP Math
  • PHP Programs
  • PHP Array Programs
  • PHP String Programs
  • PHP Interview Questions
  • PHP GMP
  • PHP IntlChar
  • PHP Image Processing
  • PHP DsSet
  • PHP DsMap
  • PHP Formatter
  • Web Technology
Open In App
Next Article:
PHP | Imagick edgeImage() Function
Next article icon

PHP | Imagick addImage() Function

Last Updated : 26 Aug, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
The Imagick::addImage() function is an inbuilt function in PHP which is used to adds new image to Imagick object image list. After the operation iterator position is moved at the end of the list. This function adds new image to Imagick object from the current position of the source object. The Imagick class have the ability to hold and operate on multiple images simultaneously. Syntax:
bool Imagick::addImage ( $source )
Parameters: This function accepts single parameter $source which holds the source Imagick object. Return Value: This function returns TRUE on success. Errors/Exceptions: This function throws ImagickException on error. Below programs illustrate the Imagick::addImage() function in PHP: Original Image 1: adpative thresold image Original Image 2: original image Program:
<?php 
  
// require_once('path/to/vendor/autoload.php');
  
header('Content-type: image/png');
  
$image = new Imagick(
'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png');
  
$t = new Imagick(
'https://media.geeksforgeeks.org/wp-content/uploads/adaptiveThresholdImage.png');
  
$image->addImage($t);
  
echo $image;
?>
                      
                       
Output: adaptive thresold image Related Articles:
  • PHP | Imagick addNoiseImage() Function
  • PHP | Imagick adaptiveBlurImage() Function
Reference: http://php.net/manual/en/imagick.addimage.php


Next Article
PHP | Imagick edgeImage() Function
author
sarthak_ishu11
Improve
Article Tags :
  • PHP
  • Web Technologies
  • Image-Processing
  • PHP-function
  • PHP-Imagick

Similar Reads

  • PHP | Gmagick addImage() Function
    The Gmagick::addImage() function is an inbuilt function in PHP which is used to adds new image to Gmagick object image list. This function adds a new image to Gmagick object from the current position of the source object. The Gmagick class have the ability to hold and operate on multiple images simu
    2 min read
  • PHP | Imagick drawImage() Function
    The Imagick::drawImage() function is an inbuilt function in PHP which is used to render the ImagickDraw object on the Imagick object. It is used to draw the image on the Imagick instance. We set an image matrix, parameters and the borders of the drawn image with the help of ImagickDraw methods and t
    2 min read
  • PHP | Imagick addNoiseImage() Function
    The Imagick::addNoiseImage() function is an inbuilt function in PHP which is used to add noise in given image. The intensity of noise depends on noise constants and channel types. The image noise is the random variation of brightness and contrast in an image. Syntax: bool Imagick::addNoiseImage ( $n
    1 min read
  • PHP | Imagick edgeImage() Function
    The Imagick::edgeImage() function is an inbuilt function in PHP which is used to enhance the edges within the image. It enhances the edges with the help of a convolution filter of the given radius. Syntax: bool Imagick::edgeImage( $radius ) Parameters: This function accepts single parameter $radius
    1 min read
  • PHP | Imagick appendImages() Function
    The Imagick::appendImages() function is an inbuilt function in PHP which is used to append set of images. This function appends a set of images into a single image. Syntax: Imagick::appendImages( $stack ) Parameters: This function accepts a single parameters $stack which is mandatory. If the stack v
    2 min read
  • PHP | Imagick frameImage() Function
    The Imagick::frameImage() function is an inbuilt function in PHP which is used to add a three-dimensional border around the image. Syntax: bool Imagick::frameImage( $color, $width, $height, $inner_bevel, $outer_bevel ) Parameters: This function accepts five parameters as mentioned above and describe
    2 min read
  • PHP | Imagick clampImage() Function
    The Imagick::clampImage() function is an inbuilt function in PHP which is used to restricts the color range from 0 to the quantum depth. This function has no impact on the image which is already in given range. Syntax: bool Imagick::clampImage( int $channel = Imagick::CHANNEL_DEFAULT ) Parameters: T
    1 min read
  • PHP | Imagick borderImage() Function
    The Imagick::borderImage() function is an inbuilt function in PHP which is used to draw the border in an image. This function creates the border surrounded to the image in the given color. Syntax: bool Imagick::borderImage( $bordercolor, $width, $height ) Parameters: This function accepts three para
    1 min read
  • PHP | Imagick cropImage() Function
    The Imagick::cropImage() function is an inbuilt function in PHP which is used to extracts the region of the image.Syntax:   int Imagick::cropImage( $width, $height, $x, $y ) Parameters: This function accept four parameters as mention above and describe below.   $width: This parameter is used to spec
    2 min read
  • PHP | Imagick flopImage() Function
    The Imagick::flopImage() function is an inbuilt function in PHP which is used to create a horizontal mirror image. Syntax: bool Imagick::flopImage( void ) Parameters: This function does not accept any parameter. Return Value: This function returns True on success. Below programs illustrate the Imagi
    1 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences