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

Plugin being built against libheif-1.5.1 doesn't open heic-file in nomacs-3.1x #14

Open
band-a-prend opened this issue May 11, 2020 · 9 comments
Labels
bug Something isn't working

Comments

@band-a-prend
Copy link

The qt-heif-image-plugin-0.3.3 successfully built against libheif-1.5.1 in Gentoo Linux.
But in nomacs-3.12 or 3.14 the tested .heic file wasn't opened with message Sorry, I couldn't load: sample.heic. While README.md file states that >=libheif-1.2 is required for 0.3.3 version.

After rebuild qt-heif-image-plugin0.3.3 against libheif-1.6.1 the sample-file successfully opened in both nomacs versions.

@jakar jakar added the bug Something isn't working label May 11, 2020
@jakar
Copy link
Owner

jakar commented May 11, 2020

Interesting. I also had trouble with libheif 1.5.x on Ubuntu, but everything was magically fixed when the libheif PPA updated to 1.6, so I completely forgot about it. Prior to 1.5, there were no issues either. Throughout all of this though, the plugin was actually built against libheif 1.1 (which is all that should be required for version 0.3.3 of the plugin).

Could you also try to build against libheif <= 1.4, just to see if libheif 1.5 specifically is the issue? I'll fiddle with some different configurations when I get a chance, but it will probably be a week or so from now (at best).

@band-a-prend
Copy link
Author

band-a-prend commented May 13, 2020

Well. I investigated the problem and check several versions. I tested as for issue report this sample file while opening in nomacs.

The nomacs with plugin installed could open this sample at least for libheif versions 1.3.2, 1.4.0, 1.4.1, 1.6.0, 1.6.1, 1.6.2 and failed to open for 1.5.0, 1.5.1. I didn't test before 1.3.2 version.

I found that the changes that broke opening sample image was added in replace old color-conversion code with the new conversion pipeline (while development of 1.5.0 version) and finally repaired in fix color conversion to interleaved formats without alpha (just 1 day before 1.6.0 release). So as seems it's completely libheif issue and there are were 4 commits before 1.6.0 release then the easiest way to fix it - update libheif to any of 1.6.x or downgrade to 1.4.x.

On the other hand with libheif-1.5.1 the gimp opens the same sample file successfully.
Maybe because it "add" alpha channel while conversion itself.

@jakar
Copy link
Owner

jakar commented May 15, 2020

Thanks for the thorough investigation!

As a quick workaround, what do you think about using 24-bit heif_chroma_interleaved_RGB and QImage::Format_RGB888 based on what heif_get_version_number() returns? Or is that not worth the hassle? Or would that not work at all?

A comment was made here about color profiles. Do you think that's related?

@band-a-prend
Copy link
Author

Sorry, I have no idea about if it's possible to workaround this situation and about relative realisation within plugin.

@jakar
Copy link
Owner

jakar commented May 19, 2020

That's fine. Thanks anyhow.

I'll keep this open for now, in case there's interest in getting libheif 1.5.x to work.

@band-a-prend
Copy link
Author

It seems that plugins doesn't work again with libheif 1.7.0 and 1.8.0.

@jakar
Copy link
Owner

jakar commented Aug 31, 2020

☹️

@jakar
Copy link
Owner

jakar commented Sep 3, 2020

Are you able to build from master and test that? None of the releases have #18 merged in.

@band-a-prend
Copy link
Author

band-a-prend commented Sep 6, 2020

Thank you for notice about patch.

I can't reproduce it again for libheif-1.8.0 from gentoo portage tree (initially tested for own build script) but the patch from #18 fix issue for libheif-1.7.0 and work for 1.8.0 too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants