[GM-help] exception when write webp to blob
Swiss army knife of image processing
Brought to you by:
bfriesen
From: 卢永菁 <sy...@gm...> - 2014-06-03 10:18:40
|
Hi, Bob I have used GraphicsMagick c++ api to change format to webp, then write it to blob, but I got errors like this: 'Magick: Unable to write blob (WEBP) reported by magick/blob.c:2004 (ImageToBlob)’ My GraphicsMagick version is 1.3.19, I see the new features in 1.3.19 says support Googles’ WEBP, so could you help me? Here is my code: Magick::InitializeMagick(*argv); Magick::Image image; Magick::Blob blob; try { image.read("/home/luyongjing/1.jpg"); image.magick("WEBP"); image.write(&blob); } catch( Magick::Exception &error_ ) { std::cout << "Caught exception: " << error_.what() << std::endl; return 1; } return 0; But when I replace the image.write(&blob) to image.write(“path/to/pic”), it works well. |