coobird / thumbnailator

Thumbnailator - a thumbnail generation library for Java
MIT License
5.14k stars 784 forks source link

Any plan to support converting webp? #137

Closed majintao closed 4 years ago

majintao commented 5 years ago

Expected behavior

Please describe what you are expecting the library to perform.

Actual behavior

Please describe the actual behavior you are experiencing, including stack trace and other information which would help diagnose the issue.

Steps to reproduce the behavior

Please enter step-by-step instructions for reproducing the actual behavior. Including code can be helpful in diagnosing issue, but please keep the code to a minimal that will reproduce the behavior.

Environment

Please provide vendor and version information for the Operating System, JDK, and Thumbnailator. Please feel free to add any other information which may be pertinent.

chickFish commented 5 years ago

good question

sicmu commented 5 years ago

good question

Emmenemoi commented 5 years ago

https://bitbucket.org/luciad/webp-imageio/src/default/ or its fork for easy maven build: https://github.com/nintha/webp-imageio-core

edreamwork commented 5 years ago

It'd be great if we can Thumbnails....outputFormat("webp")

romulodiniz commented 4 years ago

I hate spam, but any news on this support? thumbnailator is working great until now, but this lack of support for webp is a bit sad.

nitelite commented 4 years ago

The latest release of this lib was in like 2014 :P

romulodiniz commented 4 years ago

Yeah... I gave up a while ago :) Thanks!

On Fri, Jan 24, 2020 at 8:14 PM Espen Haviken notifications@github.com wrote:

The latest release of this lib was in like 2014 :P

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/coobird/thumbnailator/issues/137?email_source=notifications&email_token=ALK52JHBDGWTDZSQKKHDEKTQ7NY55A5CNFSM4GKXNOLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ4L73Y#issuecomment-578338799, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALK52JDCK26QBOGJ4B47TFLQ7NY55ANCNFSM4GKXNOLA .

coobird commented 4 years ago

Thumbnailator relies on the Java Image I/O API for reading and writing images; Thumbnailator itself doesn't include explicit support for any image file formats. Since out-of-the-box Java does not include support for WebP, If you want to support additional formats, you'll need to use Image I/O plugins that support the image format you want to use.

For example, check out the response from Emmenemoi (https://github.com/coobird/thumbnailator/issues/137#issuecomment-462295798) which includes a link to WebP support for Image I/O. Not sure how well it works since I haven't tried myself, but you'll need to look for external Image I/O plugins. (Looks like the fork on Github would be easy to use, if you have Maven, since all you'd have to do is include it as a runtime dependency.)

So, the answer is no, there will not be native support to Thumbnailator for WebP, but I think it would be worth including more information in the FAQ about this.