read image using url failed..
Posted: 2009-06-07T20:17:13-07:00
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
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