Open GoogleCodeExporter opened 9 years ago
Thank you for the detailed report.
Your use case was definitely something that was overlooked.
The current Thumbnailator, with regard to file output, will try to append a
"correct" extension to the file name if one is not present. And yes, you're
correct in that is it not documented.
The only certain way to currently workaround this issue is to use a
`FileOutputStream` to write the thumbnail -- using a `OutputStream` prevents
Thumbnailator from changing the destination file:
FileOutputStream os = new FileOutputStream("thumbnail");
Thumbnails.of(inputFile)
.size(100, 100)
.outputFormat("jpg")
.toOutputStream(outputStream);
os.close();
This behavior should be (a) possible to be disabled or (b) at least documented,
so I will accept this issue as something that needs attention.
Another solution would be to add a `asFile` method that will return a `File`
object to the resulting thumbnail -- that should address the issue of having
"no way of accessing the thumbnail".
Once again, thank you for taking time to report this issue.
Original comment by coobird...@gmail.com
on 23 Feb 2014 at 9:27
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 has been migrated to GitHub at the following URL:
https://github.com/coobird/thumbnailator/issues/66
Original comment by coobird...@gmail.com
on 25 Jul 2015 at 10:53
Original issue reported on code.google.com by
bjmac...@gmail.com
on 19 Feb 2014 at 8:15