Project

General

Profile

Bug #12061

Lossless 8-bit WEBP export is not actually lossless: output image data differs from 8-bit PNG and from 8-bit TIFF

Added by Sarge Borsch 7 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Darkroom
Target version:
-
Start date:
03/06/2018
Due date:
% Done:

0%

Affected Version:
2.4.1
System:
Mac OS X
bitness:
64-bit
hardware architecture:
amd64/x86

Description

I tested exporting into PNG, TIFF, WEBP, all with 8-bit & lossless. Settings as depicted on the 3 respective screenshots.
Sample shot taken from https://redmine.darktable.org/issues/12060 (https://redmine.darktable.org/attachments/download/3783/DSC00501.ARW.xz)
I attached XMP file here, it is the simplest (default settings + disabled sharpening and orientation, so only the essential modules are active + base curve)
I checked the hashes of the image data (that is, a hash of decoded pixel data and nothing else) with Imagemagick (identify -verbose) and found that PNG and TIFF results are the same just as expected but WEBP result is different.

$ identify -verbose DSC00501.png 2>/dev/null | grep signature
    signature: b1d84729fece09d57247ccfd9e7387b8287a1f663c3b1e49999efe7af4ade4e0
$ identify -verbose DSC00501.tif 2>/dev/null | grep signature
    signature: b1d84729fece09d57247ccfd9e7387b8287a1f663c3b1e49999efe7af4ade4e0
$ identify -verbose DSC00501.webp 2>/dev/null | grep signature
    signature: fe39b5bbf824bab14bcab5a509214ef453e7233f92f48e9e1e5e3e476fb41fca

It is also possible to observe the difference visually, here WEBP image has more blurry body of the guitar but sharper cyclic lines at the right edge of the body of the guitar.
I also tried to encode the PNG result into WEBP manually using cwebp 0.6.1, and it works losslessly, unlike darktable's WEBP encoder.

DSC00501.ARW.xmp - postprocessing reduced to minimum; but I think it doesn't matter much here (2.1 KB) Sarge Borsch, 03/06/2018 03:15 PM

settings_tiff.png (11.1 KB) Sarge Borsch, 03/06/2018 03:26 PM

settings_png.png (10.9 KB) Sarge Borsch, 03/06/2018 03:26 PM

settings_webp.png (12.5 KB) Sarge Borsch, 03/06/2018 03:26 PM

Also available in: Atom PDF