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 | Gmagick borderImage() Function
Next article icon

PHP | Imagick borderImage() Function

Last Updated : 26 Aug, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
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 parameters as mentioned above and describrd below:
  • $bordercolor: This parameter is an ImagickPixel object or a string containing the border color.
  • $width: This parameter is used to set the border width.
  • $height: This parameter is used to set border height.
Return Value: This function returns True on success. Below programs illustrate the Imagick::borderImage() function in PHP: Program 1: php
<?php  // Create an image object $image = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png');  // Set the border in the given image $image->borderImage('green', 100, 100);  header("Content-Type: image/jpg");  // Display image echo $image; ?> 
Output: border image Program 2: php
<?php  // Create an image object $image = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/adaptiveThresholdImage.png');  // Set the border in the given image $image->borderImage('green', 20, 20);  header("Content-Type: image/jpg");  // Display image echo $image; ?> 
Output: border image Related Articles:
  • PHP | Imagick addImage() Function
  • PHP | Imagick addNoiseImage() Function
  • PHP | Imagick adaptiveBlurImage() Function
Reference: http://php.net/manual/en/imagick.borderimage.php

Next Article
PHP | Gmagick borderImage() Function

V

vijay_raj
Improve
Article Tags :
  • Misc
  • Web Technologies
  • PHP
  • Image-Processing
  • PHP-function
  • PHP-Imagick
Practice Tags :
  • Misc

Similar Reads

  • PHP | Gmagick borderImage() Function
    The Gmagick::borderImage() function is an inbuilt function in PHP which is used to draw the border in an image. This function creates the border surrounding the image in the given color. Syntax: Gmagick Gmagick::borderImage( $bordercolor, $width, $height ) Parameters: This function accepts three par
    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 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 blurImage() function
    The Imagick::blurImage() function is an inbuilt function in PHP which is used to add blur filter to the image. This function returns True on success. Syntax: bool Imagick::blurImage( $radius, $sigma, $channel ) Parameters: This function accepts three parameters as mentioned above and described below
    1 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 addImage() Function
    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 Imagi
    1 min read
  • PHP | Imagick embossImage() Function
    The Imagick::embossImage() function is an inbuilt function in PHP which is used to return a grayscale image with a three-dimensional effect. This function convolves the image with a Gaussian operator of the given radius and standard deviation. Syntax: bool Imagick::embossImage( $radius, $sigma ) Par
    1 min read
  • PHP | Imagick colorizeImage() Function
    The Imagick::colorizeImage() function is an inbuilt function in PHP which is used to blends the fill color with each pixel in the image with a specified opacity. Syntax: bool Imagick::colorizeImage( mixed $colorize, mixed $opacity, bool $legacy = FALSE ) Parameters: This function accepts three param
    2 min read
  • PHP | Imagick decipherImage() Function
    The Imagick::decipherImage() function is an inbuilt function in PHP which is used to decipher an image which has been enciphered before. Syntax: bool Imagick::decipherImage( string $passphrase ) Parameters: This function accepts a single parameter $passphrase which holds the passphrase value or the
    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 specify
    2 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