[Poppler-bugs] [Bug 6984] New: pdfimages: not working

bugzilla-daemon at annarchy.freedesktop.org bugzilla-daemon at annarchy.freedesktop.org
Sat May 20 02:32:33 PDT 2006


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=6984          
     
           Summary: pdfimages: not working
           Product: poppler
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Keywords: patch
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: poppler-bugs at lists.freedesktop.org
        ReportedBy: class321 at gmx.de


1. The command line tool "pdfimages" is not working at all. No images will be 
written to disk because the ImageOutputDev is designated as non graphic device.

2. The ppm creation is not correct and results into rainbow colored pictures.

3. The following patch should fix this.


diff -u -r poppler-0.5.1/utils/ImageOutputDev.cc 
poppler-0.5.1patched/utils/ImageOutputDev.cc
--- poppler-0.5.1/utils/ImageOutputDev.cc 2006-01-23 16:24:36.000000000 +0100
+++ poppler-0.5.1patched/utils/ImageOutputDev.cc  2006-05-20 11:20:28.000000000 
+0200
@@ -184,9 +184,9 @@
       p = imgStr->getLine();
       for (x = 0; x < width; ++x) {
  colorMap->getRGB(p, &rgb);
- fputc((int)(rgb.r * 255 + 0.5), f);
- fputc((int)(rgb.g * 255 + 0.5), f);
- fputc((int)(rgb.b * 255 + 0.5), f);
+ fputc((int)(255.0 / 65536.0 * rgb.r), f);
+ fputc((int)(255.0 / 65536.0 * rgb.g), f);
+ fputc((int)(255.0 / 65536.0 * rgb.b), f);
  p += colorMap->getNumPixelComps();
       }       
     }
diff -u -r poppler-0.5.1/utils/ImageOutputDev.h 
poppler-0.5.1patched/utils/ImageOutputDev.h
--- poppler-0.5.1/utils/ImageOutputDev.h  2005-12-12 19:57:13.000000000 +0100
+++ poppler-0.5.1patched/utils/ImageOutputDev.h 2006-05-20 11:20:34.000000000 
+0200
@@ -45,7 +45,7 @@
   virtual GBool interpretType3Chars() { return gFalse; }
 
   // Does this device need non-text content?
-  virtual GBool needNonText() { return gFalse; }
+  virtual GBool needNonText() { return gTrue; }
 
   //---- get info about output device          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Poppler-bugs mailing list