-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
displaying images still fails since version > 1.15.1 #974
Comments
Possibly a bug in "geeqie" - I'm not at all familiar with that, but if the same library works in one application and not in another, perhaps its not the library. |
Well, but if the previous version works, and there was no sonme bump (was there?).... than it rather looks like the bug might be in the lib, doesn't it? |
Oh, and btw. GIMP must have the same "bug" as geeqie ;-) ... or - more likely - the lib is still broken. |
All I know is viewnior and gpicview Debian packages can view .heic, but GM can't. |
Can you check if While deferring to your expertise, clearly something is different, and understanding where the difference is might be more useful analysis than "the lib is still broken". |
Do the viewnior and gpicview Debian packages depend on libheif? Libheif is not the only way to decode HEIC. Does libheif on Debian depend on the packages it requires to read HEIC? It would be useful if someone could post the trace output from GraphicsMagick when it fails to read HEIC. For example:
also:
but as far as I am aware, libheif does not provide a means to know what codecs it supports, and so codec support listed by GM is purely speculative. |
with 1.16.2 + the patch:
with 1.16.2 + the patch:
after downgrading to 1.15.1:
|
with 1.16.2 + the patch:
with 1.15.1:
|
For
But I'd guess it might use libheif via Probably the same for
|
Oh, I shall add, that |
A quick scan through those repos shows that the ones that fail do not init the plugins, while heif-gdk-pixbuf does (naturally, since it's part of libheif itself). So the basic impression that #914 was not a sufficient fix appears correct. |
On Sun, 8 Oct 2023, Emily Bowman wrote:
A quick scan through those repos shows that the ones that fail do not init the plugins, while heif-gdk-pixbuf does (naturally, since it's part of libheif itself).
By this, do you mean call heif_init() and heif_deinit()?
The documentation does not say if these are thread safe. I hope so!
Bob
|
I just checked and there is a mutex in the heif_init()/heif_deinit() implementation. It is likely that there is some cost to the first real init so for purposes of GraphicsMagick, I would only do such a thing if/when heif is actually used. |
I put changes into GraphicsMagick Mercurial which should cause heif_init()/heif_deinit() to be used if available, but none of my libheif installs have these functions. |
I had a deeper look and indeed, depending on what libheif function the client application is calling, it may start using it without |
Great, thanks! Do you have an ETA for a new release, or should I look into backporting the changes for the Debian packaging? |
@fancycode We should make a new release soon. There are so many changes that a new release is well worth it. |
|
@calestyo Concerning The geeqie error (probably warning) seems to come from an input image without embedded color profile. Thus, in my view, this can be closed. |
Uhm... no?! As I've said several times previously (e.g. #974 (comment)) And obviously, it works again in gimp, when downgrading the to 1.15.1. Please re-open. |
Right, there was another code path. Gimp works again with the above change. |
@farindk, It works now in gimp. But something may still/newly be fishy in geeqie: When I copy a heif file in a fresh dir (i.e. no thumbnail caching or so done yet) and start geeqie there, it fails to display the first heif image, again with a:
If I then move down in the image list to another one, it starts to work, also when moving back to the original image. Again, this doesn't happen on 1.15.1, though the colour profile warning happens there, too. Any ideas? |
I cannot reproduce this behavior with geeqie. I tried with the current 'master' version of geeqie and the v1.7.2 from Ubuntu 22.04: new directory with heic images, start geeqie inside that directory and it immediately shows the first image (even without that color-profile warning). However, I noticed that geeqie does not show 10bit images correctly and crashes shortly afterwards. |
Hmm strange… Debian has version 2.1. |
Yes, the master branch from geeqie I checked out is also v2.1.
|
I guess mine’s really the true
which I think was some 3 months old. So could be that some of the commits fixed something. Are you sure that there's no other possible path, where plugin loading might still be missing? I just tried again, and in fact I see the same behaviour (failure on the first displayed file, but only when in a new directory) even without c5207b5 (but still with c1a563f). |
You could add a
and check whether it is called when viewing the first image or only at the second image. |
I have another idea. Maybe geeqie is calling libheif in parallel for all images and there is a race condition (second thread thinks it's already initialized while first thread is still in the initialization code). Could you please check whether this change in
|
It is already printed on the first image
That fixes it. :-D (and it still works in gimp and eog) If you'd say that's a misuse by geeqie, rather than some incompatible change in the library, I'd be also fine to just report that particular point as a bug against geeqie. |
Oh and with "that" I meant adding the single.
I haven't checked b04bfc0. |
Nice. Good that we found that. |
Just checked it, and seems to work in all cases. :-) Thanks! |
Great. Thanks for your help. |
Thanks for fixing! :-) Any estimate on when we'll see all this in a new release? |
In the coming days, I believe. |
@farindk This is such a common problem with heif writers, do you think it'd be possible to make this more of an INFO or DEBUG level warning, except in debug builds? (In which case maybe warnings should be errors.) I don't think their general "Who knows, screw it" attitude, much like the many malignments of JPEG standards, is going away anytime soon. They're already satisfied with whatever random default. |
@silverbacknet Right. I think the warning is coming from the gdk-pixbuf loader. Since the ICC profile is completely optional, I don't think this warning should be there at all. I have simply removed it. |
As I mentioned in the commit, this is potentially still useful info. Agreed a warning might not be warranted, but is there maybe some other logging mechanism to use? |
@kmilos Isn't it possible to simply check the returned image if it has an ICC profile? As it is completely optional, I don't see why this should be logged. I mean, we also don't log anything if the image has no Exif data or if there is no alpha channel. |
It's just a convenience to help with analyzing numerous bug reports I've seen in 3rd party apps of the kind "my heif/AVIF colours are completely wrong". Not all apps can do colour management in full - e.g. you have files w/ nclx but no ICC... Not exactly the same as ignoring Exif, as the impact on output is potentially more severe (HEIF/AVIF is more frequently used w/ wide gamut and HDR; w/ JPEG/PNG/WebP you'll be ok falling back to sRGB 99% of the time without any feedback). Still, it is indeed optional, and up to you (the libavif pixbuf loader just silently ignores it as well, and so does the webp-pixbuf-loader). I was just wondering if there was something convenient to readily take advantage of, while still keeping the verbosity down when not absolutely necessary... |
(Speaking about warnings, boy it sure took a lot of digging to find out that the bug originated here. I started with why doesn't emacs show h e i c. Then I got to GM which just gives a error message, then finally got here. Okay never mind.) |
guys, is UPDATE
|
Hey.
I think #933 was not fully fixed by #914.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041242:
Since 1.16.2 displaying images works again with
eog
, but still fails with e.g. geeqie.There's a branch based upon 1.16.2, with the patch from #914 cherry-picked, but building the package with that still causes geeqie to fail:
Any ideas?
Thanks,
Chris.
The text was updated successfully, but these errors were encountered: