Page 1 of 1

Attempting to Resize an image not behaving properly

Posted: 2012-07-05T10:37:12-07:00
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?

Re: Attempting to Resize an image not behaving properly

Posted: 2012-07-05T11:40:59-07:00
by magick
Use Geometry("2304x3456!"). The ! character does not respect the aspect ratio of the image.

Re: Attempting to Resize an image not behaving properly

Posted: 2012-07-05T12:20:14-07:00
by cesareof
Corrected my issue, perfectly, thanks for the quick response.