pngread does not read 12bit gray images

John W. Eaton jwe at bevo.che.wisc.edu
Wed Jul 16 17:59:53 CDT 2008


On 16-Jul-2008, de Almeida, Valmor F. wrote:

| Thank you for pointing this out. I currently read 12-bit png images as
| follows
| 
| Y = __magick_read__(filename);
| 
| Y = bitshift(Y,-4);
| 
| and this matches the info from running imagemagick identify on the file.
| 
| imread() should not be used if you have libpng on your system because
| this will call a reader that converts the 12-bit data to 8-bit data, and
| that is not good.

The imread function will be included in the next major release of
Octave, but it won't use pngread or jpgread.  Instead, it will only
use GraphicsMagick++ to read image files.

jwe


More information about the Help-octave mailing list