technopagan / adept-jpg-compressor

A Bash script to automate adaptive JPEG compression using common CLI tools
Other
377 stars 28 forks source link

Make sure the output JPG is actually smaller than the input image #7

Closed technopagan closed 10 years ago

technopagan commented 11 years ago

Right now, processing e.g. a high resolution image with 64x64 pixel tiles can lead to a slightly larger output image than the input. This is of course counter-productive and wasteful.

Adept neeeds to implement a check to see if the output is actually smaller than the input and only of that's true, go ahead and save the output image (and overwrite the input image if the config is set this way). Adept should do nothing in normal mode if the output is bigger (aside from deleting the output) and in verbose mode actually apologize to the user for wasting their time.

technopagan commented 10 years ago

Joey fixed this with https://github.com/technopagan/adept-jpg-compressor/pull/31