Web Image Formats and Optimization

Summary of Web Image Types and Appropriate Uses:
(adapted in part from http://yuiblog.com/blog/2008/11/04/imageopt-2/)

  • JPG is the format for photos and full color images with lots of gradients. (JPG file sizes are smaller than PNG24)
  • GIF is the format for animations.
  • PNG8 is the format for everything else — icons, buttons, backgrounds, etc. (size usually smaller than GIF, supports alpha transparency, Fireworks can output variable transparency)
  • PNG24 is the format for full color images with transparency (largest file sizes, requires filter hack for IE6)

PNG8 = 256 indexed color PNGs. Newer versions of Photoshop (CS3) can output these using “Save for web”. Supports alpha transparency just like GIFs but generally results in smaller file sizes than GIFs. Fireworks can output PNG8 with variable transparency which degrades nicely to 100% transparency in IE6.

One slight problem with PNGs is they use gamma correction which can cause problems when colors in a PNG image need to match background colors (so colors will be slightly off in the PNG). This can be solved by using a program like pngcrush to strip the gamma chunk from the image (which reduces file size a bit more as well).

NOTE: When saving images from Photoshop always use “save for web”; results in greatly reduced file sizes than just saving normally.

EXTRA NOTE: Saving JPGs as “progressive” reduces file sizes further in 94% of cases for files over 10k (for under 10k baseline JPGs are generally smaller)

Advertisement

Photoshop CS Layer Styles: Soft Interface Collection

I uploaded 3 Photoshop layer styles designed to be used together to create soft-edged interfaces. Download them from the “Goodies” section of my home page here:

http://kristinbradley.com/goodies/effects.html

Soft Interface Example Soft Interface Button Example Soft Interface Indent Example

Use the “Soft Interface” style to create an interface shape. This style works with a variety of colors or shades of grey. (Works best with mid-range tones.) Then use the soft button style to create buttons to go with the interface you created. Looks nice with buttons using the same color as the interface but experiment with different colors depending on the effect you are after. The final layer style in the collection is the “Soft Indent” style which you can use to further dress up your interface. Add 1 pixel horizontal lines or 1 pixel “dots” on a new layer about the interface shape you created. It doesn’t matter what color you make these lines. They will take on the color of the underlying interface layer.

%d bloggers like this: