Code: Select all
int imagecheck( const void * data, const unsigned long uilength ){
Blob blob( data, uilength );
Image orilImage;
try
{
orilImage.read(blob);
}
catch (std::exception& e)
{
....
}
I finally succeed when the file is in the format of JPG or BMP or GIF, but when I choose a pic in the format of PNG, it failed again and again.
When the class image read the blob, it threw exception.
I don't know whether I need to do some other operations if I read a PNG file.
or Magick++ do not support PNG in this way.
My version of ImageMagick is 6.7.1-1 and the libpng is 1.5.5beta04.