[magick-users] read image using url failed..

Santa Santa sntsnt8 at gmail.com
Tue Jun 9 14:14:57 PDT 2009


Hi All,

I tried very simple code to read an image from url but failed.
My code is

Image image("
http://www.imagemagick.org/discourse-server/styles/subsilver2/imageset/site_logo.png
");
cout << image.columns() << " " << image.rows() << endl;
image.scale("20%");
image.write("1.jpg");

I find that the image column and row are all 0
therefore the write() will have a memory allocation exception.

Beside, if I use the convert executable, it works reading an image with url
So I don't know why my code cannot work...
I hope someone can tell me how to fix this problem.

Thanks

Shane


More information about the Magick-users mailing list