rsc
2012-05-15
Hi,
could you explain to me how size parameter from read function- http://www.graphicsmagick.org/Magick++/Image.html#read could be used? Does it give a possibilty to do some scaling during load of image from file? Is it dependant on file type?
I have made some tests with quite big png and jpeg files and results were not consistent, so probably I missed something and read function with specified size doesn't work as I have supposed.
Maybe there is some example out there, that could clarify this?
Thanks!
Bob Friesenhahn
2012-05-15
The size hint only has an effect for JPEG files. It depends on functionality in the JPEG library and uses features specific to the JPEG format. PNG format is not a multi-resolution format so it is necessary to read all of the data from the PNG and scale it. If image resize is a problem, then look for the thumbnail() and scale() methods which work best for large images.
Bob
rsc
2012-05-16
Thank you very much for a clarification and hint!
Rafal