Open GoogleCodeExporter opened 9 years ago
Thank you for this report, and the sample testing image.
The leptonica tiff library has never been able to read 16 bps RGB images, and I
agree that it should, if only to downsample each component to 8 bits using the
MSB.
Changing the max bpp from 32 to 48 will not solve the problem.
I will look at this in the next month and let you know if/when it works.
Original comment by dan.bloo...@gmail.com
on 9 Sep 2014 at 2:42
Actually, libtiff does handle the problem, doing the stripping by default.
Attached is a fixed version of tiffio.c. It reads your 16bit rgb image. This
will go out in 1.72.
Original comment by dan.bloo...@gmail.com
on 11 Sep 2014 at 6:16
Attachments:
Hey Dan. As I mentioned in my original entry, just changing the BPP to 48
allowed me to open the example TIFF. I just didn't know if it would blow up
Leptonica or LibTiff somewhere else; I hadn't done any testing of other
functionality. Thanks for confirming it should work. I'll test out the new
tiffio.c when I get home tonight.
Original comment by dcree...@gmail.com
on 11 Sep 2014 at 7:16
I built Leptonica v1.72 beta's rotateorthtest1 on Windows 7 64bit using VS2008,
and then ran:
rotateorthtest1.exe rgb-3c-16b.tiff rgb-3c-16b-rotated.jpg
It said:
Warning in pixReadFromTiffStream: bpp = 48; stripping 16 bit rgb samples down to 8
and resulted in a correct (but artifacty) looking 90degree rotated 151x157x24b
jpeg image.
Original comment by tomp2...@gmail.com
on 12 Jan 2015 at 9:26
Original issue reported on code.google.com by
dcree...@gmail.com
on 20 Aug 2014 at 3:48Attachments: