Skip to content
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

Question: Any plans HEIC support? #371

Closed
2 of 4 tasks
cecilphillip opened this issue Oct 12, 2017 · 13 comments
Closed
2 of 4 tasks

Question: Any plans HEIC support? #371

cecilphillip opened this issue Oct 12, 2017 · 13 comments

Comments

@cecilphillip
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

Description

Are there any plans to support HEIF/HEIC file formats? I was looking into creating a quick converter

@cecilphillip cecilphillip changed the title Question: HEIC Support Question: Any plans HEIC support? Oct 12, 2017
@tocsoft
Copy link
Member

tocsoft commented Oct 12, 2017

We don't currently have any plans but if someone was to send in a pull request we probably wouldn't turn it down.

@tocsoft
Copy link
Member

tocsoft commented Oct 12, 2017

Actually, after having done some research on this format, I doubt we would ever add support for this to the core ImageSharp product.

The reason being is that the codec that HEIC uses (HEVC) is covered by patents that would require licensing thus we probably wouldn't be able to ship this as a core software component. Me might be able to be work something out to be able to provided as an add-on package but that would depend on how the licencing for the codec would work out.

@cecilphillip
Copy link
Author

cecilphillip commented Oct 12, 2017

Thanks for the response. I guess I'll leave these open in the event you want to track it

@flemingm
Copy link

ON iOS and macOS HEIC reading is supported natively and some version of Windows 10 (not all version) have support.

https://developer.apple.com/documentation/avfoundation/avfiletype/2873439-heif

Also :
https://github.com/nokiatech/heif (requires license for commercial use)

HEIF is a media container format. It is not an image or video encoder per se. Hence, the quality of the visual media depends highly on the proper usage of visual media encoder (e.g. HEVC). Current standard allows containing HEVC/AVC/JPEG encoded bitstreams.

@JimBobSquarePants JimBobSquarePants added this to the Future milestone Apr 24, 2020
@jonasnordlund
Copy link

jonasnordlund commented Aug 5, 2020

HEIC support already ought to be available from the Windows Imaging Component (WIC) framework and in .NET via the Windows.Graphics.Imaging namespace in case Microsoft's HEIF Image Extensions is installed. I'm not sure if ImageSharp supports automatically gathering encoding and decoding support from this API but I think it would be pretty nice and sensible if it did. This would both allow ImageSharp to stay clear of licensing issues as well as not having to implement several modern formats. The next-generation AVIF format is also already supported in Windows 10 this way.

Given how Microsoft are nowadays quick on adding image format support this way, I think it's becoming a more or less official way to manage image formats in Windows 10. Yes, it might be a nuisance to have to install image codecs from Microsoft Store, but chances are even more apps will require this in the future for format support, becoming a de facto way to manage this.

@JimBobSquarePants
Copy link
Member

That’s too Windows centric a solution.

@rickbrew
Copy link

rickbrew commented Oct 12, 2020

Implementing HEIC in managed code on your own will be quite the uphill battle.

Paint.NET relies on the built-in Windows 10 codec for decoding, and a $1 codec you have to buy from the Store for encoding. I can't provide encoding (saving) for free because it requires royalty payments.

There is a plugin for the app, HeicFileTypePlus by @0xC0000054 (aka null54), https://github.com/0xC0000054/pdn-heicfiletype-plus, that provides encode/decode for free but it uses native libs w/ GPL licensing. It doesn't use the Win10/Store codecs. The plugin is Windows-centric because the app is Windows-only, but it could probably be adapted into something that works with ImageSharp.

@JimBobSquarePants
Copy link
Member

JimBobSquarePants commented Oct 12, 2020

Yeah. I can't honestly see us implementing this now, especially with AVIF available. (I don't want to have to try and plumb native libraries)

I think if someone still desperately wants it they should build a solution based upon the code in that repository.

@onyxmaster
Copy link

Not that I'm a big fan of Apple "pick some quite obscure tech and force it upon users" tech radar, but not supporting the primary image format for one of two mobile platforms in existence looks strange. I really wanted to use ImageSharp instead of ImageMagick wrapper, but, well, not this time.

@JimBobSquarePants
Copy link
Member

Write it then.

@0xC0000054
Copy link

0xC0000054 commented Jan 22, 2022

In addition to the Paint.NET plugin I also wrote a .NET Standard wrapper for libheif (a cross-platform native library that implements HEIF/AVIF image support).
The decoder and encoder sample projects in the libheif-sharp-samples repository use ImageSharp for loading and saving images.

@JimBobSquarePants
Copy link
Member

Love it @0xC0000054 Thanks!

@ADNewsom09
Copy link

#2633 does this no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants