Worksheet: JPEG vs. GIF vs. PNG
ApplicationProgramRequired
AdobePhotoshop5.5orlater
Objectives:
1. TolearntooptimizefilesinJPEG,GIFandPNGformatandadjustthecompressionsettingstoachievethe
balancebetweenthefilesizeandoverallimagequality.
2. Tolearnthetypeofimagesthateachofthesefileformatsismosteffectiveatcompressing.
Introduction:
ThethreeimagefileformatssupportedbytheWebbrowsersareJPEG,GIFandPNG.Eachemploysdifferent
compressionalgorithmstomakethefilesizesmaller.Becauseofthedifferentalgorithms,theyworkbestwith
differenttypesofimages.
TheJPEGformatworksbestwithcontinuous‐toneimageswithaboardcolorrangeandsubtlecolorandbrightness
variations,suchasphotographsandimageswithgradients.Itsupports24‐bitcolor(millionsofcolors).JPEG
compressionisalossycompressionwhichmeansthatduringcompression,imagedataislosttomakethefilesize
smaller.HighJPEGcompressiontendstoblurtheimagedetail.(SeetheJPEGworksheetformoredetailedhands‐on
experimentation.)
TheGIFformatsupportsupto8‐bitcolor(256colors),butitalsosupportsbackgroundtransparency.Itismost
effectiveforimageswithsolidcolorssuchasillustrations,logos,andlineart.Itusesapaletteofupto256colorsto
representtheimage.Iftheoriginalimagehasmorethan256colors,thenyouwillneedtoreducethecolors.There
areseveralcolorreductionoptionsavailable,oryoucanalsocustomizethecolorstobeincludedinthepalette.A
sequenceofimagescanalsobeputtogetherintoananimatedGIF.
ThePNG‐8formatusesupto256colorstorepresenttheimage;similartoGIF.ThePNG‐24supports24‐bitcolor,
includingtransparencyinformation.UnliketheJPEGformat,PNGisanon‐lossycompressionmethod.Dependingon
theimageandtheJPEGcompression,PNG‐24mayyieldalargerfilesizethanJPEGcompressedfromthesameimage.
Instructions:
Severalsampleimagescanbedownloadedfromthebook’sWebsite.LookunderChapter3’sworksheetonJPEGvs.
GIFvs.PNG.
1. Downloadthesampleimagesfromthebook’sWebsite,oruseimagesofyourown.(Getinstructionsfrom
yourinstructorsaboutthenumberandtypeofimagesyouneedtousetocompletethisexercise.)Each
imageinthisworksheetisprovidedwithabriefdescriptiononthecharacteristicsoftheimage.Ifyouare
usingyourownimages,writeabriefdescriptionabouttheuniquecharacteristicsoftheimageandhowyou
obtainedtheimage(e.g.captureddirectlyfromadigitalcameraaswhatfileformat,scannedfromaslide,a
negative,oraprint,atwhatcolordepthandinwhatfileformat.)
3. Clickonthe4‐Uptabtoseetheoriginalimageandthreepossibleoptimizedimages.(Seethefigureofthe
4. Foreachimage,tryeachofthefollowingfiletypes:JPEG,GIF,PNG‐8,andPNG‐24.Determinethebest
compressionsettingsforeachofthesefileformatsforthesameimage.Notedownthesettingsandthefile
sizeonthefollowingpages.Circletheonethatyouthinkitgivesthebestbalancebetweenfilesizeand
imagequality.And,commentontheresultingoptimizedimageandgivetherationaleforyourdecision.