Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Open HEIF files in Gpicview
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Fri Sep 17, 2021 6:01 pm    Post subject: [SOLVED] Open HEIF files in Gpicview Reply with quote

It seems like Gpicview should support opening HEIF files through gdk-pixbuf. I assumed that enabling the gdk-pixbuf USE flag for libheif and emerging gpicview would solve this but I seem unable to open HEIF files still. Have I missed something, could there be something not working as intended or does this not work through portage at the moment?

Code:
$ emerge gdk-pixbuf libheif gpicview -vp

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-libs/gdk-pixbuf-2.42.6:2::gentoo  USE="introspection jpeg tiff -gtk-doc" 0 KiB
[ebuild   R    ] media-gfx/gpicview-0.2.5-r2::gentoo  0 KiB
[ebuild   R    ] media-libs/libheif-1.12.0:0/1.12::gentoo  USE="aom gdk-pixbuf threads x265 -go -libde265 -rav1e -test" 0 KiB

Total: 3 packages (3 reinstalls), Size of downloads: 0 KiB

Any help would be appreciated, thanks!


Last edited by hrnick on Sat Sep 18, 2021 4:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Sat Sep 18, 2021 12:44 am    Post subject: Reply with quote

Code:
$ euse -i heif
global use flags (searching: heif)
************************************************************
no matching entries found

local use flags (searching: heif)
************************************************************
[-      ] heif
    kde-frameworks/kimageformats: Support for HEIF/HEIC images
        [-  ] (5/5.85) 5.85.0 [gentoo]
        [-  ] (5/5.86) 5.86.0 [gentoo]

[-      ] heif
    media-gfx/digikam: Enable support for ISO/IEC 23008-12:2017 HEIF
    files using media-libs/x265
        [-  ] (5) 7.2.0-r1 [gentoo]
        [-  ] (5) 7.3.0 [gentoo]

[-      ] heif
    media-gfx/gimp: Enable support for ISO/IEC 23008-12:2017 HEIF files
        [-  ] (0/2) 2.10.22-r2 [gentoo]
        [-  ] (0/2) 2.10.24 [gentoo]
        [-  ] (0/2) 2.10.26 [gentoo]
        [-  ] (0/3) 2.99.6 [gentoo]
        [-  ] (0/3) 9999 [gentoo]

[-      ] heif
    media-gfx/imagemagick: Enable support for ISO/IEC 23008-12:2017
    HEIF/HEIC image format using media-libs/libheif
        [-  ] (0/6.9.11-60) 6.9.12.20 [gentoo]
        [-  ] (0/6.9.11-60) 6.9.12.21 [gentoo]
        [-  ] (0/7.1.0-0) 7.1.0.5 [gentoo]
        [-  ] (0/7.1.0-0) 7.1.0.6 [gentoo]
        [-  ] (0/7.1.0-0) 9999 [gentoo]

[-      ] heif
    media-gfx/imv: Add HEIF/HEIC image support
        [-  ] 4.3.0 [gentoo]
        [-  ] 9999 [gentoo]

[-      ] heif
    media-gfx/krita: Enable support for ISO/IEC 23008-12:2017 HEIF/HEIC
    image format using media-libs/libheif
        [-  ] (5) 4.4.5-r1 [gentoo]
        [-  ] (5) 4.4.8 [gentoo]

[-      ] heif
    media-libs/gd: Enable support for the heif format via
    media-libs/libheif
              (2/3) 2.3.0 [gentoo]
              (2/3) 2.3.1 [gentoo]
        [-  ] (2/3) 2.3.2 [gentoo]
        [-  ] (2/3) 2.3.3 [gentoo]

_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Sat Sep 18, 2021 8:31 am    Post subject: Reply with quote

Thank you for your reply figueroa!

I seem unable to open HEIF files with both Imagemagick (display) and Gimp so it might be a more general problem. The configure part of emerging Gimp shows the following so I guess it might only be an export function then:
Code:
  HEIC:                      import: no - export: yes [profile support: yes]

Any ideas?
Back to top
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Sat Sep 18, 2021 8:41 am    Post subject: Reply with quote

Sorry, I forgot to check digikam where it works so it seems like it's not a general problem then.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Sat Sep 18, 2021 1:29 pm    Post subject: Reply with quote

Look at the gimp ebuild? See what others say about gimp on-line.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Sat Sep 18, 2021 1:43 pm    Post subject: Reply with quote

What others say about Gpicview, which is what I'm trying to get to work, is that HEIF should be supported.

https://hritikchaudhary.medium.com/heif-heic-support-for-linux-ubuntu-quick-guide-9a70f4d29352

I assumed that enabling the gdk-pixbuf USE flag for libheif would be the equivalent of installing heif-gdk-pixbuf in Ubuntu. What seems to be the correct library seems to be installed as well (/usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.so) when emerging libheif.
Back to top
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Sat Sep 18, 2021 1:44 pm    Post subject: Reply with quote

Code:
$ gpicview IMG_0393.HEIC

** (gpicview:31415): WARNING **: 15:43:20.495: Unsupported feature: Unsupported codec

** (gpicview:31415): WARNING **: 15:43:20.496: Unsupported feature: Unsupported codec
Segmentation fault

I don't know what has changed but now Gpicview Segfaults when trying to load a HEIF flie. Could an strace or something be of any help?
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat Sep 18, 2021 2:37 pm    Post subject: Reply with quote

@hrnick, there's a simple solution! :)

libheif starts to work if you emerge it with all USE flags, e.g.:
Code:
USE="aom gdk-pixbuf go libde265 rav1e test threads x265" emerge libheif

After that, gpicview will be able to display images in HEIF format.
Back to top
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Sat Sep 18, 2021 4:14 pm    Post subject: Reply with quote

mike155 wrote:
@hrnick, there's a simple solution! :)

libheif starts to work if you emerge it with all USE flags, e.g.:
Code:
USE="aom gdk-pixbuf go libde265 rav1e test threads x265" emerge libheif

After that, gpicview will be able to display images in HEIF format.

Thanks for your reply mike155! Unfortunately I already have the gdk-pixbuf USE flag enabled as seen in my first post. Or would any of the other ones be relevant as well (go libde265 rav1e test)?
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat Sep 18, 2021 4:18 pm    Post subject: Reply with quote

libheif starts to work if you emerge it with *** all *** USE flags, e.g.:
Code:
USE="aom gdk-pixbuf go libde265 rav1e test threads x265" emerge libheif
Back to top
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Sat Sep 18, 2021 4:33 pm    Post subject: Reply with quote

mike155 wrote:
libheif starts to work if you emerge it with *** all *** USE flags, e.g.:
Code:
USE="aom gdk-pixbuf go libde265 rav1e test threads x265" emerge libheif

Thanks, that makes more sense, I tried it and indeed it worked! I played around with the USE flags a little and in the end it seems as if libde265 was the only one missing.

This seems very unintuitive to me, wouldn't it make more sense to have the heif USE flag for gpicview and a dependency to USE="gdk-pixbuf libde265" libheif?

Thanks again, that solves my problem. If you agree with me I might create a bug report for it later as well. :)
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat Sep 18, 2021 4:41 pm    Post subject: Reply with quote

Yes, please file a bug. :)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21627

PostPosted: Sat Sep 18, 2021 4:42 pm    Post subject: Reply with quote

hrnick wrote:
I don't know what has changed but now Gpicview Segfaults when trying to load a HEIF flie. Could an strace or something be of any help?
For a segmentation fault, a backtrace with symbols is often more helpful than strace.
Back to top
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Sat Sep 18, 2021 4:46 pm    Post subject: Reply with quote

mike155 wrote:
Yes, please file a bug. :)

It's Saturday evening where I am and I have better things to do right now but I will do it tomorrow. Thanks again for the help, I appreciate it! :)
Back to top
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Sat Sep 18, 2021 4:48 pm    Post subject: Reply with quote

Hu wrote:
For a segmentation fault, a backtrace with symbols is often more helpful than strace.

Thanks for shedding some light on this Hu! :)
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Sat Sep 18, 2021 5:04 pm    Post subject: Reply with quote

The USE flags being obtuse is not a bug. It's a shame, but not a bug. The maintainer should provide such info in an elog for the user to read, assuming the maintainer knows about them. My opinion is that few users want to see those kinds of image files, so the extra use flags and resulting dependencies should not be default.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat Sep 18, 2021 5:07 pm    Post subject: Reply with quote

hrnick wrote:
mike155 wrote:
Yes, please file a bug. :)

It's Saturday evening where I am and I have better things to do right now but I will do it tomorrow. Thanks again for the help, I appreciate it! :)

It's Saturday evening - and there's no better time to open a bug! :D

See: https://bugs.gentoo.org/813669
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat Sep 18, 2021 5:14 pm    Post subject: Reply with quote

figueroa wrote:
The USE flags being obtuse is not a bug. It's a shame, but not a bug. The maintainer should provide such info in an elog for the user to read, assuming the maintainer knows about them. My opinion is that few users want to see those kinds of image files, so the extra use flags and resulting dependencies should not be default.

There must be same kind of misunderstanding. If I emerge "libheif", I do this because I want to be able to open HEIF images.

If I can't open HEIF images after I emerged libheif, it surely is a bug, isn't it?

And I think it is surprising that USE flag "libde265" has to be added to make it work?
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat Sep 18, 2021 5:32 pm    Post subject: Reply with quote

hrnick wrote:
Code:
$ gpicview IMG_0393.HEIC

** (gpicview:31415): WARNING **: 15:43:20.495: Unsupported feature: Unsupported codec

** (gpicview:31415): WARNING **: 15:43:20.496: Unsupported feature: Unsupported codec
Segmentation fault

I don't know what has changed but now Gpicview Segfaults when trying to load a HEIF flie. Could an strace or something be of any help?

The same happened on my machine. During my first tests, a window with an error message popped up with an error message about a missing codec.

After a few tests, the behavior changed. Now I get the same segfault you posted.

Hu wrote:
For a segmentation fault, a backtrace with symbols is often more helpful than strace.

The segfault happens in gpciview:
Code:
hread 1 "gpicview" received signal SIGSEGV, Segmentation fault.
0x0000555555560aeb in main_win_show_error (message=<error reading variable: Cannot access memory at address 0x8>, mw=0x555555876330) at main-win.c:525

523  void main_win_show_error( MainWin* mw, const char* message )
524  {
525     GtkWidget* dlg = gtk_message_dialog_new( (GtkWindow*)mw,
526                                               GTK_DIALOG_MODAL,
527                                               GTK_MESSAGE_ERROR,
528                                               GTK_BUTTONS_OK,
529                                               "%s", message );
530     gtk_dialog_run( (GtkDialog*)dlg );
531     gtk_widget_destroy( dlg );
532  }

It's probably a follow-up error to the error in libheif.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Sat Sep 18, 2021 6:15 pm    Post subject: Reply with quote

mike155 wrote:
...
If I can't open HEIF images after I emerged libheif, it surely is a bug, isn't it?

And I think it is surprising that USE flag "libde265" has to be added to make it work?

libheif can't know why you want it how you intend to use it. It's a choice. Maybe I misunderstand or express this badly. I'm not a user of it so I'm not in a position to test it various ways.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum