Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Squash images #201
Squash images #201
Conversation
|
There's some slight differences caused by the CSS resizing and rounding, but I think it looks okay on the whole.
The signac image didn't respond well to resizing, so I'll exclude that from the thumbnailing:
Scripts updated to exclude signac.png, and to only thumbnail images that exceed 160x80px.
|
|
Thanks! I was working on doing something similar, but I think your script looks neater. One thing I would like to change, however: high resolution screens can render webpages with 2 physical pixels per CSS pixel. So I'd limit the images 320 x 160 instead of 160 x 80. Obviously this doesn't save quite as much data, but it keeps the logos looking nicer on high-res screens, and it's still a substantial saving (in my test, 3.3 MB to 1.3 MB). (Presumably it's even possible to render >2 pixels per CSS pixel, but we have to draw the line somewhere) Also, it sounds like pngquant does a potentially lossy compression. Is this something you know much about? Can you compare results from pngquant and pngcrush, which appears to focus on lossless compression. |
|
Sure, I'll update this to use 320 x 160px. I don't know much about the differences between pngquant and pngcrush, but I'll make a second PR with pngcrush for comparison. |
|
With 320 x 160px:
|
|
Merged #203. |


For #165 and #200.
Here's a script to thumbnail and compress the images. Let's see how these look.
The PNGs in
assets/are displayed as:So are thumbnailed to a max 160x80px with Pillow.
Then the PNGs in
assets/andimg/are compressed using pngquant.