|
|
![]() |
|
GRAPHIC FILE FORMATS FOR THE WEB :: GIF vs. JPG ( ...and PNG?) |
|
Photoshop, Fireworks, CorelDraw, Illustrator, Paint Shop Pro, Freehand,
etc... No matter what tools you use to develop, manipulate and prepare
images for web pages, there are two main image formats for web graphics
- .GIF or .JPG. GIF is the more widespread of the two but both have their
strengths in particular situations. |
|
GIF(GIF = Graphic Interchange Format) Best used with: images with areas of flat colour - cartoons. logos, line-art illustration etc. Specs: 8-bit/256 colours Compression: Reduce file size by reducing bit depth/no. of colours. Using an "adaptive" palette means that each image will use a smaller colour table using only the colours contained in the image - not the full spectrum of all colours available.
Transparency - YES - can have transparent background GIF Animations are an effective method of introducing simple looped animations to a web page - use with caution since if each frame of a GIF animation is 10k in size, then with ten frames the animation will be 100k in size. 1: 4 colours =0.4k -- 2: 16 colours =1.3k -- 3: 128 colours =2.4k |
JPG(JPEG = Joint Photographic Experts Group) Best used with: photos and images with smooth gradients. Specs: 24-bit/millions of colours Compression: Expressed as a quality percentage - does not refer to colour table - "Lossy" compression ( i.e.: some info is discarded through compression) Transparency - NO - not supported 10% Quality : File=1.5k -------------- 70% Quality : File=5k
|
GIF Interlacing = JPG Progressive scanWhen images are loaded in a web browser, they normally load from top to bottom, line by line, at full resolution. By choosing to produce Interlaced GIFs and JPG's with Progressive Scan when preparing web graphics, the result will be that browsers will display a number of versions of the image as it loads i.e.: when 12.5% of the image has loaded, a very rough version will display - this will be refreshed when 25% of the image has loaded, when 50% has loaded and then finally the image will reload at full resolution when 100% of the image information has loaded. This effect may not be noticeable on smaller images which may load too quickly. Using Interlacing for GIFs and Progressive Scan for JPG is a good idea because it gives the viewer an idea of what they are waiting for - a button for navigation or just a logo - and can make the decision whether to move on or wait for the image(s) to load. |
|
Design strategies for web graphicsOne of the "black arts" of web design is finding a balance between image quality and image file size. For both JPG and GIF files the amount of compression will vary for each individual image. Smaller images mean faster download times and less waiting for the user. Many of the newer graphics applications allow comparison of multiple image quality settings to assist in making the crucial size/quality decision.
|
|
PNG - a third option?Since around 1995 there has been an alternative image format being proposed for the web - the PORTABLE NETWORK GRAPHIC or PNG format (pronounced "Ping"). It promises to replace GIFs with better tech specs and greater flexibility. The big issue which has blocked PNGs from becoming widespread is BROWSER COMPATIBILITY. Netscape four supports them with a plug-in rather than in-line like GIFs, there are issues with transparency in version 4 Internet Explorer. These issues have mostly been addressed with more recent browser versions but it has still been a little too soon to be sure that ALL web surfers could view them. This format should become more widespread over the next few years but people have been saying the same thing for a couple of years now so... use with caution. Briefly some of the features of PNG files include ; variable transparency levels; embedded text (for descriptions or copyright info); gamma (brightness) correction; faster interlacing; 8 to 48 bit info levels; lossless compression; better compression than GIF. Note that FIREWORKS uses PNG files as it's native format. |
|
HOMILYUntil fast broadband internet connections become widespread, web designers will need to continually whittle down the size of their graphics and total web page sizes. Note that there is a strong connection between fast download times and the top fifty most popular web sites - the really successful sites like Amazon, Yahoo, MSN, AltaVista etc. all have minimal amount of images on one page - this is not to say that designers should not use graphics - just that we should use them strategically, efficiently and with intent. {REF: "Web Design in a Nutshell" Jennifer Niederst, O'Reilly & Assoc. 1999} | |
:: TOP OF PAGE ::
© Rory OBrien 2001