Bug 99988 - pdfimages does not save 16bpc bitmaps
Summary: pdfimages does not save 16bpc bitmaps
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-27 17:55 UTC by Brecht Machiels
Modified: 2017-03-13 10:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
PDF with 16 bpc bitmap (1.69 KB, application/pdf)
2017-02-28 09:09 UTC, Brecht Machiels
Details
16 bpc tiff image support (4.49 KB, patch)
2017-03-01 11:20 UTC, Adrian Johnson
Details | Splinter Review
16 bpc png and tiff image support (6.11 KB, patch)
2017-03-01 11:41 UTC, Adrian Johnson
Details | Splinter Review

Description Brecht Machiels 2017-02-27 17:55:20 UTC
If a PDF contains a bitmap with 16 bits per channel, pdfimages will save it as a 8 bpc bitmap.
Comment 1 Adrian Johnson 2017-02-27 21:15:37 UTC
We need a sample PDF with a 16 bpc image.
Comment 2 Brecht Machiels 2017-02-28 09:09:24 UTC
Created attachment 129977 [details]
PDF with 16 bpc bitmap
Comment 3 Brecht Machiels 2017-02-28 09:32:50 UTC
$ pdfimages -list basn2c16_device.pdf
page   num  type   width height color comp bpc  enc interp  object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
   1     0 image      32    32  rgb     3  16  image  no         4  0    72    72  229B 3.7%

$ pdfimages basn2c16_device.pdf basn2c16_device
$ identify basn2c16_device-000.ppm
basn2c16_device-000.ppm PPM 32x32 32x32+0+0 8-bit sRGB 3.08KB 0.000u 0:00.000

$ pdfimages -all basn2c16_device.pdf basn2c16_device
$ identify basn2c16_device-000.png
basn2c16_device-000.png PNG 32x32 32x32+0+0 8-bit sRGB 237B 0.000u 0:00.000
Comment 4 Adrian Johnson 2017-03-01 11:20:14 UTC
Created attachment 129996 [details] [review]
16 bpc tiff image support
Comment 5 Adrian Johnson 2017-03-01 11:41:20 UTC
Created attachment 129997 [details] [review]
16 bpc png and tiff image support
Comment 6 Albert Astals Cid 2017-03-03 21:44:30 UTC
Adrian, looks good to me, please commit.

I'd personally prefer if you moved the Gushort *rowp16; declaration inside the case, I know poppler mostly doesn't use that style but i appreciate vars being declarated in the smalled scope possible (you may actually need to add some {})
Comment 7 Adrian Johnson 2017-03-04 00:26:01 UTC
I've moved the declaration to to case statement. Pushed.
Comment 8 Brecht Machiels 2017-03-13 10:22:06 UTC
Thanks Adrian!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.