Bug 46066

Summary: Add option to pdfimages to list all images
Product: poppler Reporter: Adrian Johnson <ajohnson>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: add -list option to pdfimages
add -list option to pdfimages
updated patch

Description Adrian Johnson 2012-02-14 14:14:16 UTC
Created attachment 57057 [details] [review]
add -list option to pdfimages

The attached path adds a '-list' option to pdfimages to list all images in a pdf. It produces output like:

page   num  type   width height color comp bpc  enc interp  object ID
---------------------------------------------------------------------
   1     0 image    1760  1248  gray    1   8  jpeg   no      1815  0
   1     1 mask     3520  2496  -       1   1  jbig2  no      1812  0
   2     2 image    1760  1248  gray    1   8  jpeg   no         8  0
   2     3 mask     3520  2496  -       1   1  jbig2  no        10  0
   3     4 image    1760  1248  gray    1   8  jpeg   no        15  0
   3     5 mask     3520  2496  -       1   1  jbig2  no        17  0
   4     6 image    1760  1248  gray    1   8  jpeg   no        22  0
   4     7 mask     3520  2496  -       1   1  jbig2  no        24  0
Comment 1 Albert Astals Cid 2012-02-14 14:51:23 UTC
ImageOutputDev::listImage has "Object obj;" that seems unused

You added two unnneded empty lines to utils/ImageOutputDev.h

i'm confused by the "if (listImages) {" inside ImageOutputDev::writeMask, isn't it always called in an else of listImages?
Comment 2 Adrian Johnson 2012-02-15 00:19:25 UTC
Created attachment 57067 [details] [review]
add -list option to pdfimages

updated patch
Comment 3 Albert Astals Cid 2012-02-16 11:09:33 UTC
You still have "Object obj;" in ImageOutputDev::listImage that seems unused
Comment 4 Adrian Johnson 2012-02-16 13:48:18 UTC
Created attachment 57177 [details] [review]
updated patch
Comment 5 Albert Astals Cid 2012-02-17 15:07:24 UTC
Almost good now :D

Remove the , after imgSmask and commit to master :-)
Comment 6 Adrian Johnson 2012-02-17 15:28:13 UTC
Committed

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.