Comments for First Look Code https://firstlook.org/code Open Source Tools Thu, 28 May 2015 13:47:01 +0000 hourly 1 http://wordpress.org/?v=4.2.2 Comment on Hello World, Welcome to First Look Code by Micah Lee https://firstlook.org/code/2015/05/27/hello-world-welcome/#comment-6 Thu, 28 May 2015 13:47:01 +0000 https://firstlook.org/code/?p=27#comment-6 Very interesting. It would be great to tweak the settings to make it higher quality but keeping the same or smaller file size. We’re already planning on making a command line flag to let users adjust the quality here: https://github.com/firstlook/pdf-redact-tools/issues/13

The only problem with your suggestion is that the resulting PNGs will be monochrome, which I bet is why the file size is much smaller. But it would make sense to add a –monochrome flag too, in case what you’re converting doesn’t have color and you want a smaller file size? Or a –color flag, and have it default to monochrome.

]]>
Comment on Hello World, Welcome to First Look Code by Micah Lee https://firstlook.org/code/2015/05/27/hello-world-welcome/#comment-5 Thu, 28 May 2015 13:41:30 +0000 https://firstlook.org/code/?p=27#comment-5 Feel free to propose projects here in the comments. However we have very limited development resources, so we’ll probably only work on them if we see a direct need for it in the newsroom, or if we think it will be very helpful for privacy and security in general. I think we’re a lot more likely to implement new features in our existing projects than new projects altogether.

]]>
Comment on Hello World, Welcome to First Look Code by SomeDeveloper https://firstlook.org/code/2015/05/27/hello-world-welcome/#comment-4 Thu, 28 May 2015 00:13:43 +0000 https://firstlook.org/code/?p=27#comment-4 Hi,
What about proposing projects to First Look instead of merely making pull requests on existing projects. Is there going to be a mechanism for that in the future?

]]>
Comment on Hello World, Welcome to First Look Code by TimH https://firstlook.org/code/2015/05/27/hello-world-welcome/#comment-3 Wed, 27 May 2015 22:40:56 +0000 https://firstlook.org/code/?p=27#comment-3 Taking TI’s bq25570.pdf datasheet as example. 1.5MB -> 6.5MB.
Changing code from:
subprocess.call([ ‘convert’,
‘-density’, ‘128’,
self.pdf_filename,
‘-quality’, ‘100’,
‘-sharpen’, ‘0x1.0′,
self.transparent_filename])
to:
subprocess.call([ ‘convert’,
‘-density’, ‘300’,
self.pdf_filename,
‘-monochrome’,
self.transparent_filename])
makes a 5.1MB result, and it’s 300dpi not 128dpi, so more readable.

]]>
Comment on Hello World, Welcome to First Look Code by TimH https://firstlook.org/code/2015/05/27/hello-world-welcome/#comment-2 Wed, 27 May 2015 21:40:47 +0000 https://firstlook.org/code/?p=27#comment-2 Thanks for pdf-redact-tools. A couple of suggestions:
1. The flattened png pages, eg page-00.png, are full color and blurred with gif/jpg shading compression artifacts, even if the original text was monochrome. This detracts from readability and increases file size. A quick and dirty solution might be to have an option that forces the sanitized document to be 1 bit per pixel for simple dcos. Also, do the page dump in both full color (as now) and in monochrome (so two dumps, essentially), and allow the editor to pick the appropriate pages to be assembled into the final pdf.
2. Needs OCR.

]]>