Hi,
I want to use the MagickCore to do the exact the same as the command-line "Convert -resize 64x64 input.jpg output.jpg" which wil scale the image accordingly rather than fix the dimensions as in ResizeImage, SacleImage, etc. for given the column and row size.
When using command-line "Convert" for a given image with geometry of 2492x1944+0+0, after resize with 64x64, it produced geometry with 64x48.
How would I do that?
Thanks for any help.
Best,
--Wo
How to resize/resample image using MagickCore
Re: How to resize/resample image using MagickCore
Use TransformImage() if you want the aspect ratio of the image to be respected. ResizeImage(), as you have seen, resizes to the exact image dimensions you provide.
Re: How to resize/resample image using MagickCore
Great and thanks, it works!
BTW: I also see the TransformImages, how does this work?
By looking at the parameters:
MagickBooleanType TransformImages(Image **image,
const char *crop_geometry,const char *image_geometry)
how do you provide a list of images? Are there any advantages of using TransformImages vs. TransformImage? If it does cut down the processing time, I'd be very interested since I have over 5,000+ pictures to process.
Thanks again for any answer.
--Wo
BTW: I also see the TransformImages, how does this work?
By looking at the parameters:
MagickBooleanType TransformImages(Image **image,
const char *crop_geometry,const char *image_geometry)
how do you provide a list of images? Are there any advantages of using TransformImages vs. TransformImage? If it does cut down the processing time, I'd be very interested since I have over 5,000+ pictures to process.
Thanks again for any answer.
--Wo
Re: How to resize/resample image using MagickCore
Use TransformImages() if you want to resize a list of images. A GIF image may have 10 frames, for example, and TransformImages() will resize (or crop) all 10 frames in the sequence.
Re: How to resize/resample image using MagickCore
Good feature! Thanks for the info.
--Wo
--Wo