help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pngread does not read 12bit gray images


From: de Almeida, Valmor F.
Subject: pngread does not read 12bit gray images
Date: Sat, 05 Jul 2008 13:41:04 -0400

Hello,

I am using imread() to read 12-bit png images. The result of 

Y = imread("foo.png");
class(I);

is uint16. However the max and min values of Y are not correct. I
tracked the problem down to this section of pngread.cc in the
octave-forge package image-1.06

  // For now, use 8-bit only
  if (bit_depth == 16) {
      png_set_strip_16(png_ptr);
  }

Is there a simple fix for this so that I do get all gray values into the
matrix Y? The issue here is that after the 8-bit strip, the image loses
critical information; in particular contrast details that are important
for the image processing code I am writing.

Thanks,

--
Valmor

PS: Actually I started writing an experimental pngread() for reading
gray images with depths greater than 8 bits. Since this is something I
have not done before, I would appreciate any inputs.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]