How to place a image on a white background

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
Floezen
Posts: 5
Joined: 2013-09-16T11:47:51-07:00
Authentication code: 6789

How to place a image on a white background

Post by Floezen » 2013-09-16T12:46:05-07:00

I have a picture, lets say 300 x 200 pixel, but I want to have it on a squared "layout" of 400 x 400 pixel. (Without changing the size of the original picture.)

Is there a function to do this? Like an function opposite to MagickCropImage( )?

Or would I have to merge this picture with another white-picture of 400x400?

Thanks
Flözen

User avatar
fmw42
Posts: 22079
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: How to place a image on a white background

Post by fmw42 » 2013-09-16T13:10:23-07:00

Find the equivalent of -extent. See http://www.imagemagick.org/Usage/crop/#extent

Floezen
Posts: 5
Joined: 2013-09-16T11:47:51-07:00
Authentication code: 6789

Re: How to place a image on a white background

Post by Floezen » 2013-09-18T13:42:05-07:00

Ok, thanks so far, but what would be the MagickWand equivalent to extend?

User avatar
fmw42
Posts: 22079
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: How to place a image on a white background

Post by fmw42 » 2013-09-18T14:01:33-07:00

Floezen wrote:Ok, thanks so far, but what would be the MagickWand equivalent to extend?

Sorry I do not use any APIs, only the command line. The documentation for your API should have something that you recognize with a similar name. Otherwise, someone who uses your API may need to respond.

Post Reply