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

optipng (vs|+) pngout #477

Closed
Alysko opened this issue May 3, 2011 · 14 comments
Closed

optipng (vs|+) pngout #477

Alysko opened this issue May 3, 2011 · 14 comments

Comments

@Alysko
Copy link

Alysko commented May 3, 2011

Hi,

It's just a note.

optipng doesn't strip useless txt - let by software like Adobe Photoshop - in PNG. pngout does.

pngout compress better but you have tell him what kind of png is there (color+alpha, greyscale+alpha, etc.), otherwise he's doing wrong.
optipng knows what type of png should be used.

So, if I want a real optimised PNG (for example to convert in base64 for dataURI), I use optipng then pngout (in that order).

@paulirish
Copy link
Member

hmm we want to move to "improved pngquant".. do you know what its behavior is?

@craigbarnes
Copy link

The following is about as good as lossless compression gets for PNGs:

optipng -o7 *.png && advpng -z4 *png && advdef -z4 *.png

PNGOUT is closed source, it's license prohibits bundled distribution and it's development is completely mothballed.

@nimbupani
Copy link
Member

Looping in @pornel! Do you have a recommendation for using pngquant with H5BP build script?

@kornelski
Copy link

pngquant removes all optional chunks. Files reduced with pngquant can be further optimised with optipng & co.

Beware that some png's might not take conversion to png8 well, so this can't be blindly applied to all of them (I plan to include dssim tool with pngquant to detect this case and skip conversion automatically.)

@Alysko
Copy link
Author

Alysko commented Sep 13, 2011

"improved pngquant" is not a tool to optimize png, but to "Quantizes one or more 32-bit RGBA PNGs to 8-bit (or smaller)" (which is done very well). But it's not the same.

Metadata stripping is planned for v0.7 of OptiPNG, but there's no release date.

pngcrush is also a very good alternative. There is a "prod option", -brute, which test all the different optimization to determine the best. But it's verrryyyy slow (6s ans (gain 2.6%) for the default on a 140k/24b png ; 46s (gain 4%) for with the -brute option). But it doesn't strip comment too.

And yes, PNGOUT is closed source, but it's one of the few to strip comment.

@craigbarnes
Copy link

"improved pngquant" is not a tool to optimize png, but to "Quantizes one or more 32-bit RGBA PNGs to 8-bit (or smaller)" (which is done very well). But it's not the same.

I'm pretty sure @pornel already knows what it does ;)

@Alysko
Copy link
Author

Alysko commented Sep 14, 2011

This was a reply to Paul :) "improved pngquant" should not replace optipng because it's a different tool.

@Vyeche
Copy link

Vyeche commented Sep 25, 2011

I find PNGout doing way more compression then optiPNG. I did some tests on 32 bit depth and they compressed down to the same file size, as compared to using PNGout. Damns, so much for automating the png's in HTML5 boilerplate.

@tchalvak
Copy link

tchalvak commented Nov 3, 2011

So no consensus on this one, then?

@Alysko
Copy link
Author

Alysko commented Nov 4, 2011

Yes : wait for optipng v.0.7 (Plans for version 0.7: Metadata editing -- including the highly-anticipated metadata stripping capability :-))

@necolas
Copy link
Member

necolas commented Feb 3, 2012

Closing this because the plan seems to be "update optipng when there's a new release". If this needs to be reopened, please do it at the ant build script repo with a cross-repo link back to this issue. Thanks

@necolas necolas closed this as completed Feb 3, 2012
@ghost
Copy link

ghost commented Feb 21, 2013

So I've mentioned 2 years ago that automatic conversion to png8 might be risky. Well, it's fixed now:

pngquant --quality=90-99 --force --ext .png file.png

This will overwrite the file.png only if conversion doesn't lose more than 10% of quality (quality is min-max format) and makes pngquant automatically choose number of colors aiming for only 1% quality loss.

Still, file size can be reduced afterwards with lossless optimizers like optipng or pngout.

@mathiasbynens mathiasbynens reopened this Feb 21, 2013
@roblarsen
Copy link
Member

I'm already on this over at the ant build script repo.

@necolas
Copy link
Member

necolas commented Feb 21, 2013

Thanks guys. Closing as this is an issue for the build script. But good to know.

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

10 participants