Passing a jpeg size hint with MagickCore
Posted: 2014-04-10T14:52:49-07:00
I am resizing JPEGs, programatically with the MagickCore interface.
I note with the convert command that passing a size hint dramatically speeds up the resize:
I assume I need to add it to original_image_info (so it can be passed to the jpeg loader), but I cannot see where in the code to do so.
Thanks in advance.
I note with the convert command that passing a size hint dramatically speeds up the resize:
I would like to pass this in to my MagickCore code, but I do not see how. This is my code:convert -define jpeg:size=800x800 -resize=800x800 balloon.jpg b.jpg
Code: Select all
ImageInfo* original_image_info = AcquireImageInfo();
ExceptionInfo* ei = AcquireExceptionInfo();
Image* original_image = BlobToImage(original_image_info, ptr, sz, ei);
SyncImageSettings(original_image_info, original_image); // todo: needed?
Image* resized_image = AdaptiveResizeImage(original_image, width, height, ei);
Thanks in advance.