Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looks fine, but unless this is a command line tool I can integrate into my build scripts then I'm just not going to use it.


If you want a good list of command-line tools to do this sort of thing, have a look at the ImageOptim website (http://imageoptim.com/), which lists all of the command-line tools it combines together.


imageoptim is my current go to... it's pretty solid.

I have an image that imageoptim brought down to 149kb. I ran THAT already compressed image through compressor.io and it brought it down to 51kb. Whoa. Very very minimal degradation in some of the image drop shadows but not enough to care based on that file size


If you use ImageAlpha before ImageOptim and reduce the colors, you will get even smaller files. Lot's of PNGs will not contain many colors anyway.


Google mod_pagespeed for Apache/nginx does a good job of compressing images, it does things like use a 4:2:0 YUV colourspace and it also serves webp format to clients that support such things.

The advantage of the mod_pagespeed approach is that you can keep hi-res images in your web page and not have to be concerned with manually compressing things.


Yeah unfortunately I agree.

Also how does it compare to other tools such as ImageAlpha http://pngmini.com ?


You can get decent results on jpeg images using jpegtran, and if you don't mind progressive jpegs, you can get slightly smaller images with a progressive scan table optimized for your images (determining the ideal scan order for your dataset is left as an exercise to the reader):

    jpegtran -optimize -progressive -scans scan_table.txt image.jpg > image_optimized.jpg


I use pngcrush for that, but there are many to choose from.


For pngs you will get better results by using optipng and then pngout on the result.

    optipng in.png -o 5 -strip all -out temp.png
    pngout -f6 -kp -ks temp.png out.png
For jpegs, use jpegrescan.

    jpegrescan -s -t in.jpg out.jpg




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: