[ 
https://issues.apache.org/jira/browse/PDFBOX-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705270#action_12705270
 ] 

Daniel Wilson commented on PDFBOX-460:
--------------------------------------

Thanks, Jeremias.  I will indeed re-create the reference bitmaps.

> [PATCH] Improvements for bitmap production (resolution and color depth)
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-460
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-460
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 0.8.0-incubator
>            Reporter: Jeremias Maerki
>            Priority: Minor
>             Fix For: 0.8.0-incubator
>
>         Attachments: bitmap-production-improvements.diff
>
>
> The attached patch improves the PDFToImage utility to support a resolution 
> and color depth setting.
> -resolution 300dpi creates a 300 dpi bitmap
> -color rgba creates an RGB 24bit image with an 8bit alpha channel
> -color rgb creates an RGB 24bit image
> -color gray creates an 8bit gray image
> -color indexed creates an 8bit color image with 256 indexed colors (that was 
> what was produced before the change)
> -color bilevel creates a 1bit bi-level image
> The patch also fixes various Checkstyle issues in the classes I touched. I've 
> tried to preserve method backwards-compatibility. However, I've changed 
> PDFImageWriter.WriteImage to PDFImageWriter.writeImage. Method names should 
> always start with a lower-case character. PageDrawer has similar problems 
> which I didn't fix, however.
> @Daniel: Please note that the changes makes the TestPDFToImage test case fail 
> because I've changed the default settings for PDFToImage to "rgb" and the 
> screen resolution (usually 96dpi). Before the settings were equivalent to 
> "-resolution 144 -color indexed". Furthermore, the output formats that 
> support a resolution value through standard ImageIO metadata will now contain 
> the resolution information. That alone will make the reference PNGs different 
> even if I had set the default settings to the old settings and effectively 
> created the same images on the pixel level. You may need to decide on the 
> settings for the test and recreate the reference bitmaps.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to