Skip to content

Squash images (pngcrush version) #202

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

Closed
wants to merge 13 commits into from

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Apr 26, 2019

For #165 and #200.

Like #201 but with lossless pngcrush instead of lossy pngquant.

What How big Percent of original
master 3,230,356 bytes (3.4 MB on disk) 100%
after script 1,423,814 bytes (1.5 MB on disk) 44%

(Edit: updated after script sizes)

The -brute option doesn't save much space, but we're not time critical so might as well squeeze out the last few bytes.

Option Time Size
With -brute 1m30s 1,423,814 bytes (1.5 MB on disk) for 62 items
Without -brute 7s 1,431,120 bytes (1.5 MB on disk) for 62 items

(Edit: updated)

@takluyver
Copy link
Member

How are you getting those sizes? I just checked out this branch, and I'm seeing about 1.5 MB of data in assets.

@hugovk
Copy link
Contributor Author

hugovk commented Apr 26, 2019

Good question! I also see 1,423,814 bytes (1.5 MB on disk) now.

I must have initially tested pngcrush without resizing first. I'll update with/without -brute values too.

@hugovk
Copy link
Contributor Author

hugovk commented Apr 26, 2019

Updated, sorry for the confusion!

@takluyver
Copy link
Member

Thanks!

As I'm not an expert in image processing, I'm inclined to go with the lossless compression for now (this PR). We can always swap in pngquant later if we need to squeeze the size even more. Does that sound reasonable to you?

@hugovk
Copy link
Contributor Author

hugovk commented Apr 26, 2019

You're welcome!

Sounds perfectly reasonable, it's already a good saving.

@takluyver
Copy link
Member

OK, thanks. I'm going to rebase the branch locally to cut out all the regenerations of the images, and make a couple of other manual tweaks.

@takluyver
Copy link
Member

Continued & merged in #203.

@takluyver takluyver closed this Apr 26, 2019
@takluyver takluyver mentioned this pull request Apr 26, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants