How to use -extent cmd line parameter in C++ application.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Bunkai
Posts: 22
Joined: 2007-01-15T07:37:59-07:00

How to use -extent cmd line parameter in C++ application.

Post by Bunkai »

I need to enlarge the image canvas by say adding 100 pixel rows repeatedly for about 10 times in C++. I know, there is good command line function -extent that can do the job I need.

Although, I develop my application in C++, I would like to know if there is anything that works like cmd line -extent parameter that would add a new empty image block to the existing image. It is important to mention, that I don't want to resize the existing grapics in the canvas, I just want to add more space for drawing to the bottom of it.

I have spent long time trying to find answer, because I came here. Indeed, how to -extent my image by say 100 pixels in bottom part, by adding background color, in C++ please?

Thank you and with regards,
Rene.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We'll add an extent() method to Magick++ within a few days. For now you would need to create a blank canvas image and append it to your image to extend an image.
Bunkai
Posts: 22
Joined: 2007-01-15T07:37:59-07:00

Post by Bunkai »

Hello Magick,

thank you very much.

Was it your original plan to add extent() to Magick++, or will you do that because of my question?

Thank you anyway, and I am looking forward next release of ImageMagick.

Rene.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Our plan is to make all MagickWand methods available in Magick++ as time permits. In the mean-time you can access MagickCore methods directly in the MagickLib namespace (e.g. MagickLib::ExtentImage()) or wait until tommorrow and grab 6.3.2-0 Beta which has the Magick++ extent() method declared.
Bunkai
Posts: 22
Joined: 2007-01-15T07:37:59-07:00

Post by Bunkai »

Hello Magick,

Thank you very much. It will be very good to have all the MagicWand functions available in Magick++.

Yes, That was my original plan, to use MagickLib::ExtentImage(); if Extent() was not available from Magick++.

Thank you again, and wish you a lot of succes with ImageMagick.

For your information only, there is another very competitive library called FreeImage (http://freeimage.sourceforge.net/) available, I did a close comparison of both, and I think, ImageMagick is far, far better.

With regards,
Rene.
Bunkai
Posts: 22
Joined: 2007-01-15T07:37:59-07:00

Post by Bunkai »

http://www.imagemagick.org/script/changelog.php - this link claims, that there should be ImageMagick 6.3.2-0 available already, in January 16. 2007.

I went through several FTP sites offering ImageMagick for download, however, i did not find this version yet. Is there any primary download place where the most recent version is uploaded firstly, or do I have to wait several days, until the new version gets spread over the all FTP sites, please?

I checked forum as well, but did not find any relevant link, although search for "download" returned many results.

Thank you and with regards,
Rene.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

You can find beta releases of ImageMagick here: ftp://ftp.imagemagick.org/pub/ImageMagick/beta.
Bunkai
Posts: 22
Joined: 2007-01-15T07:37:59-07:00

Post by Bunkai »

Magick,

Thank you very much.

Have a nice day,
Rene.
Post Reply