Skip to content
This repository was archived by the owner on Jan 17, 2023. It is now read-only.
This repository was archived by the owner on Jan 17, 2023. It is now read-only.

PNG images are not optimized #5436

@atoponce

Description

@atoponce
  • Firefox 80.0
  • Debian GNU/Linux bullseye/sid

Saving screenshots are not optimized. On average, screenshots could be about 30%-40% smaller on download. For example, if I take a screenshot of the first published comic of SMBC, and download, the file size is 58162 bytes:

$ ls -l /tmp/smbc.png 
-rw-r--r-- 1 aaron aaron 58162 Aug 27 21:35 /tmp/smbc.png

Optimizing the image reduces it by 40.99%:

$ optipng /tmp/smbc.png
** Processing: /tmp/smbc.png
468x612 pixels, 4x8 bits/pixel, RGB+alpha
Reducing image to 8 bits/pixel, 64 colors in palette
Input IDAT size = 58021 bytes
Input file size = 58162 bytes

Trying:
  zc = 9  zm = 8  zs = 0  f = 0		IDAT size = 34063
                               
Selecting parameters:
  zc = 9  zm = 8  zs = 0  f = 0		IDAT size = 34063

Output IDAT size = 34063 bytes (23958 bytes decrease)
Output file size = 34324 bytes (23838 bytes = 40.99% decrease)

The new file size (as reported by optipng(1)) is now 34324 bytes:

$ ls -l /tmp/smbc.png  
-rw-rw-r-- 1 aaron aaron 34324 Aug 27 21:36 /tmp/smbc.png

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions