Closed AndroidDeveloperLB closed 5 years ago
We have no plans to support HEIC format. It is a commercial format and we would have to pay Apple to be able to let users export their work as HEIC. I think HEIC will be never used in practice, as there are better and free formats.
A nice WebP decoder has been developed by @dominikhlbg . Dominik, could you tell us something about your library? What functions should be called? How should we use the RIFF decoder?
I see. So HEIC is quite bad. But what about animated WEBP ? I hope it gets supported.
We do support still WebP images (even with transparency), import and export. But not animated WebP yet. @dominikhlbg made a WebP library, but with no description, and it is hard to get in touch with him.
Yes. Still nice to see such a tool exists. I tried to open animated GIF, but I couldn't understand how to edit each frame
The work with animations is described here: https://www.photopea.com/learn/animations . Actually, it is quite simple, once you get used to it.
I just realised, that there is no library for creating WEBP animations. It would be quite a lot of work to create such library. I will close it for now.
Doesn't Android P have the decoding&encoding of animated WEBP? Or this: https://developers.google.com/speed/webp/docs/api ?
We need a Javascript library, there is no Javascript library for WebP :(
I guess converting between the languages would take a lot of work...
But why close the issue, though?
Writing a WebP library is a hard task and I doubt somebody will make such library any time soon.
Can't you leave it as request, and that some day it might be possible without too much work? Can you at least have a workaround for this? For example, allow to import the animated WEBP into frames, which will be exported to multiple images when trying to save?
Hi, I fixed it. Now, you can load and save WEBP animations in Photopea. See here: https://www.photopea.com/learn/animations
You are full of surprises... Thank you for this.
I managed to do it with Dominiks library and encoding by a browser.
@photopea Yes I was wondering how you did it, after you said it's a lot of work. Could HEIC decoding be done though (without encoding)? Or does it also require annoying licenses?
Current HEIC decoders are quite large, it would require adding 1 MB to resources of Photopea (which is quite a lot) ... e.g. WebP decoder is only 60 kB.
Personally, I think we should boycott HEIC, just like Apple boycotted Flash Player on iPhones, so that the humanity switches to open standards instead.
@photopea Wow what are they doing with all of this space... Is there a way to lazy-load it (AKA "by demand")? Meaning that only if the user chooses an HEIC file, it will load this code ? About support of HEIC, I agree. But, Android supports it to some degree:
https://developer.android.com/guide/topics/media/media-formats
Current HEIC decoders are quite large, it would require adding 1 MB to resources of Photopea (which is quite a lot) ... e.g. WebP decoder is only 60 kB.
Hi @photopea, I really appreciate all your effort on this amazing tool. I would like to know if you could provide an opensource version of your WebP encoder/decoder, like you did with UPNG.js?
@jaronwanderley We use the LibWebP as a decoder in Photopea, which is compiled to WASM : libwebp.zip.
We use Canvas.toDataURL() to encode into WebP, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL
@jaronwanderley We use the LibWebP as a decoder in Photopea, which is compiled to WASM : libwebp.zip.
We use Canvas.toDataURL() to encode into WebP, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL
@photopea I already saw it, the encode using Canvas.toDataURL(), but I can't figure out how to encode a animated WebP, could you show your process or a gist for it?
You can open HEIC now! It is available in a plugin by @hxim . Press Window - Plugins, and choose "JPEG XL, AVIF" plugin. An icon will appear in the right bar, which lets you load HEIC images.
Photopea can open HEIC and JPEG XL files now using File - Open, without any plugins! :)
@AndroidDeveloperLB I see a HEIC file in your ZIP archive, but is it really animated? What software should I use to see the animation?
@photopea I think it's from here: http://nokiatech.github.io/heif/examples.html Reach "Image sequences" there. Can be shown on web browser somehow.
Examples here: test.zip