-
-
Notifications
You must be signed in to change notification settings - Fork 884
Add support for HEIF based images #2633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…nto heic-support
Oh wow! Thanks! 🙏 I’ll have a good dig through asap!! |
I noticed that you used the x265 encoder. This is licensed under the GPL and cannot be used in this project. |
True, and that is why I used the Nokia repository as reference for my implementation, which has a license which I guess is compatible with ImageSharp. I did not start on writing an HVC Codec, due to patent concerns. Nokia also includes a Patent waiver in its license. AVIF is supposed to be patent free, even its Codec. For AVIF I used SVT-AV1 as a reference, which has a 3-clause BSD license. With all this, I hope the reference implementations that are mentioned now, can be used to create an AVIF Codec implementation in ImageSharp. |
Not sure if its suitable to do so or not, but putting this comment on as a appreciation of the effort but also a vote for avif support and anyone seeing this who is after it can thumbs this up to show their desire too as it would be great as the storage saving is fantastic as a result of avif vs jpg for sure along with the wide support existing now. Edit: Silly me, just thought to put an additional heart reaction on the original PR post, woops! |
…nto heic-support
is this still active? really waiting for this feature! |
I'm still here. But after several attempts to crack the Entropy Encoding, I figured I need a break to start with a fresh mind. |
I am now adopting ImageSharp.Heif nuget package, but it's out of date and does not work with iPhone >15 HEIF formats because it is using libheif version 1.15.1, meanwhile the latest is 1.20.2. I even tried to build C++ native libs that they are using - no luck. Check out the issue in their repo if you're curious. maybe you can peek some ideas on cracking the Entropy Encoding from the original libd265/libheif authors repo from here (libd265, the h.265 codec for image and video processing, written in C++), or here (libheif, written in C++ uses libd265 for HEIC decode and other libs to encode and decode formats), or maybe here (libheif-sharp, written with C# and uses C++ libheif API calls)? both C# ImageSharp.Heif and libheif-sharp projects are using native C++ libs API's that are built and packed as nuget package with C++ binaries maybe that'll help! thank you for your effort, looking forward to hear any updates from you. |
Prerequisites
Description
This PR is an attempt to start with #1320
Implemented decoding and encoding of images based on a HEIF (ISO/IEC 23008-12:2022) container. These include (amongst others): HEIC, HIF and AVIF.
Please note this PR does NOT add any new compression algorithm to ImageSharp. For now it will take a JPEG thumbnail as its pixel source.
Needless to say, much more work is needed after this PR to reach the goal. I'm try to help there also.
Please do let me know any comments, also on whether to support the HEIF file format in the first place.