Summary: | pdftoppm -tiff -gray/-mono generates wrong image | ||
---|---|---|---|
Product: | poppler | Reporter: | kenjiuno <ku> |
Component: | utils | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Windows (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
kenjiuno
2016-11-02 03:39:51 UTC
The format parameter to the image writers defines the pixel format so there is no need to add the supportNativeMonoRowData() function. I would suggest adding the data: SplashColorMode imageWriterFormat; to SplashBitmap.h. In writeImgFile() (line 353), set imageWriterFormat to the format to supply to writeRow(). ie splashModeMono8 for TiffWriter(TiffWriter::GRAY), splashModeMono1 for TiffWriter(TiffWriter::MONO), and splashModeRGB8 for everything else. Then use imageWriterFormat in writeImgFile() (line 620) to determine the data format to use for mode = splashModeMono8 or splashModeMono1. Ok, it should be better way. I have rewritten according to your advice! https://github.com/HiraokaHyperTools/poppler_mirror/commit/ec4fcfc4a30adce1795aaf6ccc2dea8936ab4a3c Adrian will you review the patch or should I? patch looks good Pushed with slight changes. Thank you, it works with no problem! |
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.