comics icon indicating copy to clipboard operation
comics copied to clipboard

Smush comic images to save disk space and reduce page load time

Open jodal opened this issue 12 years ago • 1 comments

The size of comic images can be reduced without loosing any quality by pushing them through lossless optimization, like e.g. Yahoo's www.smushit.com can do for you. Smushing comics would save a lot of disk space and reduce page load time.

Some work have already been done by @adamcik on a tool for smushing the images in comics' archive. See the file bin/smush in the repo for details.

jodal avatar Jun 07 '12 13:06 jodal

See https://developers.google.com/speed/docs/best-practices/payload#CompressImages and http://developer.yahoo.com/performance/rules.html#opt_images for tips. You might also be able to convert PNG24 to PNG8 in some cases saving a lot of size. I was also thinking about trimming whitespace, but that feels like a bad idea.

For insanely large images splitting images might also be a good idea, but one would need to do something like http://stackoverflow.com/questions/2933084/is-cropping-of-jpeg-images-using-the-pil-lossless if you want it to be a lossless operation.

Or just 'jpegtran -crop WxH+X+Y -copy none -optimize -perfect -outfile output.jpg input.jpg' which I tested on one such image, in that case there was no reduction in size, but at least it can be downloaded in parallel.

adamcik avatar Jun 07 '12 14:06 adamcik