I find way to convert 16 bits grayscale blob to PNG image from file:
Code: Select all
convert -size 600x600 gray:rawdata.dat -depth 16 out.png
But I want to make this by PHP extension Imagick. Its not working.
Code: Select all
$fill="...long string witch have 16 bits pairs of grayscale...";
$im=new Imagick();
$im->setResolution($width,$height);
$im->readImageBlob($fill);
...exception...
Code: Select all
PHP Fatal error: Uncaught exception 'ImagickException' with message 'no decode delegate for this image format `' @ error/blob.c/BlobToImage/364' in ...
P.S.: rawdata.dat and $fill have same data.