| Summary: |
pdfimages: not working |
| Product: |
poppler
|
Reporter: |
Rainer Keller <class321> |
| Component: |
general | Assignee: |
poppler-bugs <poppler-bugs> |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
|
| Severity: |
normal
|
|
|
| Priority: |
high
|
Keywords: |
patch |
| Version: |
unspecified | |
|
| Hardware: |
Other | |
|
| OS: |
Linux (All) | |
|
| Whiteboard: |
|
|
i915 platform:
|
|
i915 features:
|
|
| Attachments: |
patch for bug 6984
|
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.
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