Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #748
Closed
Open
Issue created Feb 24, 2014 by Administrator@rootContributor

Recompress PNGs

Created by: rbrito

Hi there.

While I was testing my page with http://developers.google.com/speed/pagespeed/insights/ the tool told me:

Optimize images Properly formatting and compressing images can save many bytes of data. Optimize the following images to reduce their size by 1.1KiB (44% reduction).

Losslessly compressing http://cdn.mathjax.org/mathjax/2.3-latest/images/CloseX-31.png could save 1.1KiB (44% reduction).

It seems that this problem is reocurring, given issue #734 (closed), for instance. The savings of about 44% sound great, but I guess that Google is being conservative here:

$ optipng -o7 CloseX-31.png 
(...)
Selecting parameters:
  zc = 9  zm = 8  zs = 1  f = 0     IDAT size = 1194

Output IDAT size = 1194 bytes (1328 bytes decrease)
Output file size = 1449 bytes (1196 bytes = 45.22% decrease)

$ advpng -z3 CloseX-31.png 
        1449        1312  90% CloseX-31.png
        1449        1312  90%
$ advpng -z4 -i 10 CloseX-31.png 
        1312        1269  96% CloseX-31.png
        1312        1269  96%

In other words, I obtained a file with total size 1268, which, compared to the original, represents about 48%, considerably more than what Google suggests.

Anyway, even if we don't go after every last saved bit, it would be nice to have a smaller image. If patches are needed, desired, please let me know.

Thanks,

Rogério.

Assignee
Assign to
Time tracking