read image using url failed..

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
sntsnt8

read image using url failed..

Post by sntsnt8 »

Hi,

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

Image image("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.

I hope someone can tell me how to fix this problem.
Thanks
sntsnt8

Re: read image using url failed..

Post by sntsnt8 »

Beside, if I use the convert executable, it works....
So I don't know why my code cannot work...
sntsnt8

Re: read image using url failed..

Post by sntsnt8 »

i find the reason is i'm missing the xml lib...
:D
Post Reply