libheif
libheif copied to clipboard
heif-enc issue wih black and white jpegs
Hi,
full color JPG images I can convert properly, but the b&w are always black - when opened in irfanview or in some other tool. When opened on ImageMagick, then it is shown fine.
Images converted by ImageMagick(on Linux) are fine.
Tested on Windows with the latest build 1.12
I am missing some special switch there, or it is a bug ?
If the encoded B/W images open fine in ImageMagick but not in IrfanView, it sounds like a bug in IrfanView. Or did I misunderstand the issue?
The same happens for android viewers, not only irfanview. Files created with ImageMagick are working fine everywhere.
Could you attach an example image, encoded both with heif-enc
and ImageMagick
to let me examine the difference?
It's a bit strange since ImageMagick is also using libheif internally.
BTW: is this with HEIC output or AVIF?
BTW: is this with HEIC output or AVIF?
HEIC
Some observation: the other one which was encoded properly in both ways - file sizes are same. The wrong one differs ...
The image encoded by ImageMagick is not really a greyscale image. It is a color image with empty color planes. It seems to convert the greyscale input to color first. heif-enc on the other hand, encodes the input to real greyscale HEICs.
Thus, I still think that the problem is that IrfanView and other viewers cannot display greyscale HEIF images.
2heifenc.zip this one is shown properly by irfanview and others tool - encoded by heicenc.
It is hard to believe that the near all android applications and the one of the most popular apps will be broken...
I just remembered, irfanview is using a windows component to show the HEIF files, so it is not his problem with decoding. Is there a way how to force color compression instead of b&w for HEIC encoder ?
Hi,
this build libheif-1.6.2-r1106-g3824054 is producing correct (visible in irfanview) results for my first example.
libheif-1.6.2 didn't produce greyscale output yet. We need a heif-enc option to always convert to color.
Then I will use this one till it will be extended with new parameter.
Thank you very much for your time.