firstlookmedia / pdf-redact-tools

a set of tools to help with securely redacting and stripping metadata from documents before publishing
Other
533 stars 48 forks source link

Added flag for quality #24

Open anaisabel7 opened 7 years ago

anaisabel7 commented 7 years ago

A command line option to set the quality sent to the 'convert' program on exploding has been set. The value given to quality must be an integer, but no other limitations where implemented.

Tests were not written since no unittest structure could be found in the project.

This PR should deal with issue #13

micahflee commented 7 years ago

Sorry, a previous PR caused some conflicts with this one. It's simple enough though and I resolved them, but I confirmed that this didn't actually fix the problem. I took a PDF and tried exploding it with quality 10, and then tried exploding it again with quality 100, but in either case it outputs identical PNGs.

I think that maybe -quality just doesn't do what we thought it did in this context.

anaisabel7 commented 7 years ago

@micahflee Thank you for checking this :smiley_cat:

ocram commented 4 years ago

Since PNG is a lossless format, the quality option to convert doesn’t actually reduce or improve visual quality, it just controls (losless) compression with Deflate/zlib:

Instead, the density or resolution in DPI may be increased.