simon-knuth / scanner

An all-in-one scanner app built for the Universal Windows Platform
https://simon-knuth.github.io/scanner/index
Mozilla Public License 2.0
476 stars 28 forks source link

Add compression for the scans #79

Open larsschellhas opened 2 years ago

larsschellhas commented 2 years ago

Is your feature request related to a problem? Please describe. Files become quite large when scanning with high resolution. Size could be reduced without loss of quality by compressing it.

Describe the solution you'd like I would like the app to automatically compress files when they are saved and it would be great if you could choose between:

Describe alternatives you've considered I could go to smallpdf.com every time and download a compressed version, or use the "HP Smart" app for scanning and compressing in a single process.

simon-knuth commented 2 years ago

I'll try and take a look at this later. Compression's a touchy subject, since I originally planned on keeping the original files intact as much as possible and avoiding unpredictable interplay between the chosen resolution and the app's processing when it comes to image quality/size. But with all the features and updates shipped since the original release, the processing has slowly increased, so that's not really a valid excuse anymore. PDF compression would definitely be the highest priority here, just as you said.

larsschellhas commented 2 years ago

Thank you! I appreciate the work, you put into the app also the reasoning of keeping the original files as long as possible :) Looking forward to future developments! 😊

DavidNGray commented 2 years ago

Actually, it appears that this app used to do compression but stopped in an update around February or March of this year. For multi-page document scans (monochrome at 300dpi) which I routinely do once a month, before March, I was getting PDF file sizes in the range of 200KB to 400KB, but now they're all more than 2,300KB. The whole reason I was using this app was because it produced more compact files than the scanner utility that came with my Canon scanner. So this is a deal-breaker regression for me.

lashchev commented 9 months ago

Picking compression levels for JPGs and PDFs is essential. If you have a good scanner, then for documents/pictures with small details, it is way better to scan with 600 dpi with the lowest JPG compression (level 1 of 5) instead of 300 dpi. It produces files only with 2x the size but with way more details and insignificant compression artifacts. Saving with a medium compression level (3 of 5) will produce files 50% larger with minimal to no visual difference. PDFs support a high compression algorithm for images that produce acceptable quality for document scans but produce 7-10 times smaller files, which is a lot!

RokeJulianLockhart commented 2 months ago

https://github.com/simon-knuth/scanner/issues/79#issue-1213348464

For .TIFF images, I've found that deflate losslessly reduces the file size by approximately 80% on average, so being able to apply that automatically would be very useful.