https://bugs.kde.org/show_bug.cgi?id=468609

--- Comment #1 from caulier.gil...@gmail.com ---
Right, from Image MAgick, we can see :

gilles@U22:/mnt/data/Images/HEIF$ identify test.heif 
test.heif HEIC 3237x2007 3237x2007+0+0 10-bit YCbCr 0.020u 0:00.011

>From the console, when loading file on editor, libheif identify this file with
8 bits color depth:

digikam.dimg: "/mnt/data/Images/HEIF/test.heif" : "HEIF" file identified
digikam.dimg.heif: HEIF image size: ( 3237 x 2007 )
digikam.dimg.heif: Decoded HEIF image properties: size( 3237 x 2007 ), Alpha:
false , Color depth : 8
digikam.dimg.heif: HEIF data container: 0x55acd15cdb00
digikam.dimg.heif: HEIC bytes per line: 9728
digikam.dimg.heif: Color bytes depth: 8

So problem must be located in how we manage libheif in the HEIF loader, as
Image Magick which uses libheif too, is able to convert to PNG with preserving
the color depth :

gilles@U22:/mnt/data/Images/HEIF$ convert test.heif test.png
gilles@U22:/mnt/data/Images/HEIF$ identify test.png 
test.png PNG 3237x2007 3237x2007+0+0 16-bit sRGB 17.1832MiB 0.000u 0:00.000

Probably this code must be used :

https://github.com/ImageMagick/ImageMagick/blob/main/coders/heic.c#L354

In digiKam, we uses : 

https://invent.kde.org/graphics/digikam/-/blob/master/core/dplugins/dimg/heif/dimgheifloader_load.cpp#L389

Gilles Caulier

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to