Hi there,
I have a question regarding speed/scale issues of image I/O using the Magick++ C++ API.
My goal is an image with max. dimension of, say, 250 px.
I want file input to be fast even when reading large-scale image files (several MP).
My current C++ code looks like this:
> include <Magick++.h>
> ...
> Image img( Geometry(250,250),
> Color(0,0,0,0) );
> img.read("file.jpg");
On my ubuntu karmic, I get a slightly larger image (461x346).
Other people have reported that the code above runs very slow (8-10 sec. on 2,5MP images, using imagemagick 6.6.2.5).
My questions are:
- Am I using Magick++ the wrong way here?
- is read( Geometry, string) the right way here?
- How is the size of the resulting image related to the Geometry I specify (particularly, what happens if the aspect ratio of the image file does not fit the specified Geometry)?
- Does the behavior depend on the image file format?
- Does the behavior depend on the version of imagemagick?
Any help (or pointers to docs that I missed) is greatly appreciated -
thanks in advance,
adul