Attempting to Resize an image not behaving properly

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
cesareof
Posts: 11
Joined: 2011-03-25T08:12:07-07:00
Authentication code: 8675308

Attempting to Resize an image not behaving properly

Post by cesareof »

I am trying to resize an image, from 320x240 to any size I may need, it is simply a black bmp, that I composite under the natural size of an existing image (used then for watermarking )

The problem is when i try to resize the image to a rather large size i end up with a different width and height then the one I specified.

Code: Select all

	Image img_Ressizing;
	img_Ressizing.read("d:\black.bmp");
	img_Ressizing.resize(Geometry(2304, 3456));
	img_Ressizing.write("d:\resized.jpg");
Ends up with d:\resized.jpg 2304x1728
Is geometry or resize trying to maintain a 4:3 aspect ratio?
If so how do I stop it from doing that?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Attempting to Resize an image not behaving properly

Post by magick »

Use Geometry("2304x3456!"). The ! character does not respect the aspect ratio of the image.
cesareof
Posts: 11
Joined: 2011-03-25T08:12:07-07:00
Authentication code: 8675308

Re: Attempting to Resize an image not behaving properly

Post by cesareof »

Corrected my issue, perfectly, thanks for the quick response.
Post Reply