Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Square artifacts in gradient #243

Open
skohlmann opened this issue Jan 19, 2018 · 5 comments
Open

Square artifacts in gradient #243

skohlmann opened this issue Jan 19, 2018 · 5 comments

Comments

@skohlmann
Copy link

The attached guetzli encoded JPEG (695330_a2_guetzli.jpg) contains squared artifats where other encoded images doesn't contain such artifacts. The image was created with --quality 90.

The attached guetzli encoded JPEG was created by the Mister Spex glass frames production image pipeline. This pipeline is highly optimized for glass frame images. It based on SSIM (DSSIM version 0.9 http://pornel.net/dssim) and tries to find the optimal quality value for a given encoder to reach a give dissimilarity value.

The JPEG encoders are:

  • CJPEG, version 9b 17-Jan-2016
  • MOZJPEG version 3.1 (build 20160818)
  • guetzli 1.0.1

The encoders are executed with different parameter:

  • mozjpeg: -progressive -optimize -sample 2x2 -tune-ms-ssim -quant-table 2 -dc-scan-opt 2
  • cjpeg 9b: -progressive -optimize -sample 2x2

The final images are encoded with the following quality values:

  • guetzli: 90
  • mozjpeg: 96
  • cjpeg: 95

After image creation jpegrescan optimizes the Huffman table. In case all 3 images are calculated, the algorithm selects the image with the lowest files size.

I've attached the results. Additional I attached the source PNG file and the current Photoshop image from production site.

It will be fine to fix the square artifact problem.

Thx

6695330_a2_cjpeg9b
6695330_a2_guetzli
6695330_a2_mozjpeg
6695330_a2_photoshop
6695330_a2

@mdelarioja
Copy link

+1. I am also seeing this in some of my images at different quality levels.

@jyrkialakuijala
Copy link
Collaborator

@mdelarioja Which version of Guetzli are you using? Which quality levels do you observe the problem? Could you share the image, too?

While there is no full solution to this problem yet, there might be a mitigation: I think current version of Guetzli reads the png as an 8-bit image and if your source is 16 bits, you may possibly get better results by converting the source into an 8-bit images using dithering.

I will give it a try to solve this properly during the next two months.

@mdelarioja
Copy link

@jyrkialakuijala I'm very excited to hear that work is still being done on this project!

I am using guetzli through imagemin, and I am actually using guetzli to optimize high quality JPGs exported from Lightroom. I see similar artifacts at different levels, all the way up to quality 95 (haven't tried going above that, though).

@jyrkialakuijala
Copy link
Collaborator

I will be trying a new candidate fix for this problem -- to make butteraugli asymmetric in relation to high frequency artefacts, i.e., to punish smoothing less than adding new sharp (high frequency) artefacts. I expect to be able to do this in three weeks.

@mdelarioja
Copy link

@jyrkialakuijala That's great news! Thank you for your amazing work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants