Search found 4 matches

by roflson
2014-04-11T12:19:17-07:00
Forum: Developers
Topic: Detecting Image type from raw bytes
Replies: 2
Views: 5118

Re: Detecting Image type from raw bytes

I am doing this in-memory with the MagickCore interface. I need to determine an image type from the raw bytes before calling BlobToImage
by roflson
2014-04-11T10:30:46-07:00
Forum: Developers
Topic: Detecting Image type from raw bytes
Replies: 2
Views: 5118

Detecting Image type from raw bytes

In order to speed up my image processing, I use the jpeg:size hint to give the JPEG decoder more efficiency. However, I don't want to do this blindly. How can I detect an image type from the raw bytes before calling BlobToImage? I could write code to inspect the header, but I think Imagemagick ...
by roflson
2014-04-10T17:00:59-07:00
Forum: Developers
Topic: Passing a jpeg size hint with MagickCore
Replies: 2
Views: 4692

Re: Passing a jpeg size hint with MagickCore

Thanks for the hint. Both of the following appear to work: SetImageOption(original_image_info, "jpeg:size", "800x800"); DefineImageOption(original_image_info,"jpeg:size=800x800"); There are many ways to skin a cat.
by roflson
2014-04-10T14:52:49-07:00
Forum: Developers
Topic: Passing a jpeg size hint with MagickCore
Replies: 2
Views: 4692

Passing a jpeg size hint with MagickCore

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: convert -define jpeg:size=800x800 -resize=800x800 balloon.jpg b.jpg I would like to pass this in to my MagickCore code, but I do not see how ...