pngread does not read 12bit gray images
de Almeida, Valmor F.
dealmeidav at ornl.gov
Fri Jul 11 00:10:43 CDT 2008
> -----Original Message-----
> From: Søren Hauberg [mailto:soren at hauberg.org]
> Sent: Sunday, July 06, 2008 3:26 AM
>
> Since you have 'pngread' installed 'imread' will try to use that. So,
> I'd try to use '__magick_read__' directly, i.e.
>
> Y = __magick_read__ ("foo.png");
>
> and see how that works.
Yep. It does work. However it is a little tricky to compare the max(Y(:)) and min(Y(:)) values octave has in memory with the output of imagemagick's "identify" tool.
Just for the record. In the following output from identify
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 275x220+0+0
Type: Grayscale
Endianess: Undefined
Colorspace: Gray
Depth: 16-bit
Channel depth:
Gray: 12-bit
Channel statistics:
Gray:
Min: 774 (0.188968)
Max: 1558 (0.380377)
Mean: 1213.52 (0.296275)
Standard deviation: 95.3054 (0.0232683)
Octave's values for min and max are: 12384 and 24928. These are obtained from multiplying the corresponding numbers in parentheses from the "identify" output by 65536.
Thanks,
--
Valmor
>
> Søren
More information about the Help-octave
mailing list