Open GoogleCodeExporter opened 9 years ago
Sorry for the delayed response.
Resizing the original image to something smaller but ending up with a larger
file could happen in a couple of circumstances. (At least which I can think of
right now.)
1. If the original image was using a higher compression level than the final
image.
2. If the final image is less compressible than the original image.
Since it appears that the dimensions of the original and file images are the
same, I don't believe that (2) would apply to this case. (This case would
generally happen to line drawings and such that have sharp contrast, which
would be "smoothed out" when resized to a smaller image.)
I haven't taken a closer look at the original file, but I'm going to guess that
the original image had a higher compression level than the final image.
What could generally be tried in this kind of case is to use the
`outputQuality` method to change the compression level. However, I tried
changing the compression level but was unable to affect the file size, which
seems to indicate that the PNG encoder that is bundled with Java in my
environment (Java 1.6, Ubuntu) may not support changing the compression level.
As such, there may not be a workaround to this issue.
However, please be aware that the purpose of Thumbnailator is to *resize*
images rather than to recompress images with the same dimensions, so you may
want to evaluate other means if you are trying to *reduce* the file size of
images.
Original comment by coobird...@gmail.com
on 16 Jun 2015 at 3:50
The Thumbnailator project will move to GitHub due to the Google Project Hosting
going read-only in one month.
http://google-opensource.blogspot.jp/2015/03/farewell-to-google-code.html
This issue will be tracked at GitHub at the following URL:
https://github.com/coobird/thumbnailator/issues/77
Original comment by coobird...@gmail.com
on 25 Jul 2015 at 6:07
Original issue reported on code.google.com by
jun...@gmail.com
on 1 Jun 2015 at 5:05Attachments: