Converting heic file fails

Ive tried to convert heic images to jpg without success :disappointed:
The files seem to be in the correct format … see …

dad@Dadsiinew:~/Pictures> heif-info ./IMG_2433.HEIC
MIME type: image/heic
main brand: heic
compatible brands: mif1, MiPr, miaf, MiHB, heic

image: 4032x3024 (id=49), primary
tiles: 8x6, tile size: 512x512
colorspace: YCbCr, 4:2:0
bit depth: 8
thumbnail: 320x240
color profile: prof
alpha channel: no
depth channel: no
metadata:
Exif: 2588 bytes
transformations:
angle (ccw): 0
region annotations:
none
text items:
none
properties:
none
MIME items:

But this is the result when I try to convert … see …

dad@Dadsiinew:~/Pictures> heif-convert ./IMG_2433.HEIC ./img2433.jpg
File contains 1 image
decoding image… 100%
Could not decode image: Decoder plugin generated an error: Unspecified

Any suggestions ??

Can you show the output of
zypper se -si heif

This is the result …
dad@Dadsiinew:~/Pictures> zypper se -si heif
Loading repository data…
Reading installed packages…

S | Name | Type | Version | Arch | Repository
—±--------------------------±--------±---------------------±-------±----------
i+ | gdk-pixbuf-loader-libheif | package | 1.21.2-160000.4.pm.1 | x86_64 | packman
i+ | heif-examples | package | 1.21.2-160000.4.pm.1 | x86_64 | packman
i+ | libheif-aom | package | 1.21.2-160000.4.pm.1 | x86_64 | packman
i+ | libheif-dav1d | package | 1.21.2-160000.4.pm.1 | x86_64 | packman
i+ | libheif-ffmpeg | package | 1.21.2-160000.4.pm.1 | x86_64 | packman
i+ | libheif-jpeg | package | 1.21.2-160000.4.pm.1 | x86_64 | packman
i+ | libheif-openjpeg | package | 1.21.2-160000.4.pm.1 | x86_64 | packman
i+ | libheif-rav1e | package | 1.21.2-160000.4.pm.1 | x86_64 | packman
i+ | libheif-svtenc | package | 1.21.2-160000.4.pm.1 | x86_64 | packman
i+ | libheif1 | package | 1.21.2-160000.4.pm.1 | x86_64 | packman

Note: For an extended search including not yet activated remote resources please use 'zypper
search-packages'.

The files are from an iPhoneXR IOS version 18.7.4

I don’t use packman, therefore heif-convert is not availabe to me.
I use:

magick xyz.heic xyz.jpeg

Why do you have ./ in front of your file names, I doubt that is the file name?

1 Like

@hcgrant:

I occasionally receive HEIC images from an OPPO Find X9 mobile telephone with a Hasselblad imaging system – they only display either on my Android telephone or, my MacBook – digiKam/showFoto can only display the thumbnail – GIMP and Krita only display an error.

@swannema
I’ll try ImageMagick and see if that works …thanks

The " ./ " is short for “the directory I’m currently in”

@hcgrant ,
Please, to make the pieces of computer code in your posts better consumable by technical oriented people:

This construct is only needed when you want to execute a file that is in your working directory. In a command like

heif-convert ./IMG_2433.HEIC ./img2433.jpg

it is superfluous.

Yes, it is a file name (that implies a path).
Assuming that IMG_2433.HEIC exists in the working directory (which can be determined from the prompt as ~/Pictures), you can address that file in several ways:

  1. IMG_2433.HEIC simply the file within the working directory;
  2. ./IMG_2433.HEICa relative path, relative to the working directory;
  3. ~/Pictures/IMG_2433.HEIC an absolute path using the tilde construct to point to the home directory of the current user;
  4. /home/dad/Pictures/IMG_2433.HEIC the absolute path to the file;
  5. many more variations.

While #2 above seems to be a bit overdone, it can however be used when you want to execute a file that is in your working directory. Because the shell (bash) will protect you from executing by incident a file that resides in the working directory (a very old prevention mechanism). Thus you have to explicitly express that you indeed mean to execute that one and then the ./ construct is the shortest that can be used.

3 Likes

Another method is to open the file in gimp and use export to jpeg or png etc… then just delete the original heic file if you don’t need it to retain.

I just use the heif-convert and it is working in tumbleweed.
To the op, to make it simple, just open your file manager to the folder with heic image. When you are in that folder right click and inside the window and open a terminal this way you can just do
heif-convert image-heic file.jpeg. Command is shorter.

Anybody successfully displaying the samples at https://heic.digital/samples/
Because no conversion is possible if nothing correctly reads the original file (tried in Tumbleweed and Leap 16)

I just tried the shelf-christmas-decoration.heic and I can display and convert it just fine using the magick command.
Edit I tried some of the others as well, they all work.

On Tumbleweed still:

bruno@LT-B:~/Downloads> magick shelf-christmas-decoration.heic shelf.jpeg
magick: Decoder plugin generated an error: Unspecified (7.0) `shelf-christmas-decoration.heic' @ error/heic.c/IsHEIFSuccess/202.
bruno@LT-B:~/Downloads>

So what do you use? Packman? Selected plugins or packages?

I see now, enable Packman Essentials and install libheif-HEIF

LT-B:~ # zypper in libheif-HEIF

and accept the switch to Packman of the 11 related packages.
This is on Tumbleweed, should be similar on Leap 16.

S | Name | Summary | Type
—±--------------------------±--------------------------------------±-------
i+ | gdk-pixbuf-loader-libheif | GDK PixBuf Loader for libheif | package
i+ | gimp-plugin-heif | Plugin for GIMP to load HEIF files | package
i+ | heif-examples | Example binary programs for libheif | package
i+ | heif-thumbnailer | Thumbnailer for HEIF/AVIF image files | package
i+ | libheif-aom | Plugin AOM encoder and decoder for → | package
i+ | libheif-dav1d | Plugin dav1d decoder for AVIF | package
i+ | libheif-ffmpeg | Plugin FFMPEG decoder (HW acc) for → | package
i+ | libheif-HEIF | Plugin for HEIF decoder and encoder | package
i+ | libheif-jpeg | Plugin encoder and decoder for JPEG-> | package
i+ | libheif-openh264 | Plugin OpenH264 decoder in HEIF | package
i+ | libheif-openjpeg | Plugin OpenJPEG J2K encoder and dec-> | package
i+ | libheif-rav1e | Plugin rav1e encoder for AVIF | package
i+ | libheif-svtenc | Plugin SVT-AV1 encoder for AVIF | package
i+ | libheif-x264 | Pluging for X264 encoder | package
i+ | libheif1 | HEIF/AVIF file format decoder and e-> | package

This is the package that work. I think the most important package is the heif-examples
This is the one for the heif-convert

I do not use packman at all, so that can not be it. I have the vlc repo enabled and from there I use ffmpeg8/7, vlc, libx265 and libx264.
For a long time I needed the heif packages from packman but since a couple of weeks that is no longer necessary, I think but I am not 100% sure that has to do with the glycin-loader package, it includes e.g. heif thumbnailer.

stefan@Tumbleweed:~> zypper se -si heif

S  | Name                      | Type  | Version    | Arch   | Repository
---+---------------------------+-------+------------+--------+---------------
i+ | gdk-pixbuf-loader-libheif | Paket | 1.21.2-1.1 | x86_64 | tumbleweed OSS
i+ | libheif-aom               | Paket | 1.21.2-1.1 | x86_64 | tumbleweed OSS
i+ | libheif-dav1d             | Paket | 1.21.2-1.1 | x86_64 | tumbleweed OSS
i+ | libheif-ffmpeg            | Paket | 1.21.2-1.1 | x86_64 | tumbleweed OSS
i+ | libheif-jpeg              | Paket | 1.21.2-1.1 | x86_64 | tumbleweed OSS
i+ | libheif-openjpeg          | Paket | 1.21.2-1.1 | x86_64 | tumbleweed OSS
i+ | libheif-rav1e             | Paket | 1.21.2-1.1 | x86_64 | tumbleweed OSS
i+ | libheif-svtenc            | Paket | 1.21.2-1.1 | x86_64 | tumbleweed OSS
i+ | libheif1                  | Paket | 1.21.2-1.1 | x86_64 | tumbleweed OSS

stefan@Tumbleweed:~> zypper se -si glycin

S  | Name           | Type  | Version   | Arch   | Repository
---+----------------+-------+-----------+--------+---------------
i  | glycin-loaders | Paket | 2.0.8-1.1 | x86_64 | tumbleweed OSS
i  | libglycin-2-0  | Paket | 2.0.8-1.1 | x86_64 | tumbleweed OSS

On Linux – GIMP, Okular, Krita, showFoto and Gwenview all error.
But Mozilla Firefox displays the thumbnails on the HEIC sample gallery web site correctly.

An Android mobile telephone and macOS Tahoe 26.2 both display the .heic pictures correctly.

 > kinfo
Operating System: openSUSE Tumbleweed 20260213
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.2
Kernel Version: 6.18.9-1-default (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 8600G w/ Radeon 760M Graphics
Memory: 34 GB of RAM (32.8 GB usable)
Graphics Processor: AMD Radeon 760M Graphics
 > 
 > LANG=C zypper search --installed-only --repo openSUSE:repo-oss heif
Loading repository data...
Reading installed packages...

S  | Name                      | Summary                                                       | Type
---+---------------------------+---------------------------------------------------------------+--------
i  | gdk-pixbuf-loader-libheif | GDK PixBuf Loader for libheif                                 | package
i  | libheif-aom               | Plugin AOM encoder and decoder for AVIF                       | package
i  | libheif-dav1d             | Plugin dav1d decoder for AVIF                                 | package
i  | libheif-ffmpeg            | Plugin FFMPEG decoder (HW acc) for HEIC                       | package
i  | libheif-jpeg              | Plugin encoder and decoder for JPEG in HEIF                   | package
i  | libheif-openh264          | Plugin OpenH264 decoder in HEIF                               | package
i  | libheif-openjpeg          | Plugin OpenJPEG J2K encoder and decoder for JPEG-2000 in HEIF | package
i  | libheif-rav1e             | Plugin rav1e encoder for AVIF                                 | package
i  | libheif-svtenc            | Plugin SVT-AV1 encoder for AVIF                               | package
i+ | libheif1                  | HEIF/AVIF file format decoder and encoder                     | package

    Note: For an extended search including not yet activated remote resources please use 'zypper
    search-packages'.
 > 

P.S.: The picture quality of the macBook Air M3 is, as usual, very, very, good – actually excellent … → digiKam on my Tumbleweed system also displays excellent picture quality but, the Mac is a tiny bit better …

  • Which is one of the two reasons I have the thing – the other is, the need for a couple of applications which are only available either for MS Windows or, Mac – the Garmin Navigation system in my car and, the RAW picture processing for my Sigma camera.

You have to install heif-examples.
For gimp the gimp-plugin-heif


Image converted using:
heif-convert