Menu

#296 JPEG_ACCURATE results in artifacts on Windows, but not on Ubuntu

open
nobody
None
5
2019-11-10
2019-10-18
No

Loading the attached grid.jpg with FreeImage_Load() using FIF_JPEG and JPEG_ACCURATE with FreeImage 3.17 on Ubuntu x86-64 and AArch64 (ARM) and storing the raw data returned by FreeImage_GetBits() results in RGB data with smooth gradients.
Doing the same with FreeImage 3.17 or 3.18 on Windows x86-64 results in RGB data with blocky tiles.

The attached test_freeimage_jpeg_accurate.cpp generates these RGB data files (I didn't use any export function to restrict the bug to the image loading). To visualize the data, you can open them with GIMP as "Raw image data" with Image Type "RGB" and width and height set to 320.

6 Attachments

Discussion

  • Moritz Kroll

    Moritz Kroll - 2019-10-18

    Sorry, ignore the "test_jpg_freeimage.mdl" file, looks like I cannot remove wrong attachments from my own ticket...

     
  • Moritz Kroll

    Moritz Kroll - 2019-10-18

    Looks like Sourceforge recompressed "grid.jpg" with even more artifacts. Please find the original file in "grid-jpg.zip"

     
  • Hervé Drolon

    Hervé Drolon - 2019-11-10

    Hi,

    JPEG compression results can be different if you compare decompressed pixels obtained with a library X vs decompressed pixels obtained with the distributed JPEG FreeImage Library.
    Linux distributions use LibJPEG v6b or LibJPEG v8x instead of the FreeImage provided library (LibJPEG v9c).
    The compression / decompression algorithms are not the same, thus the decompressed pixels are different.
    see e.g.
    https://libjpeg-turbo.org/About/Jpeg-9
    http://www.hackerfactor.com/blog/index.php?/archives/250-Showing-JPEGs-True-Color.html

    Hervé

     

Log in to post a comment.

MongoDB Logo MongoDB