资源描述:
《网页制作教程 赵丰年 1_英文 chap3-images》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Chapter3Images1ObjectivesTellthedifferencebetweendifferentimagerepresentations.ComparedifferentWebgraphicfileformats.Masterthebasicimageprocessingskills.UseimagesonaWebpageappropriately.2ImagerepresentationThereare2typesofimage:bitmappedandvector.Bitmap
2、---animageisdividedintoamatrixofpixels.---eachpixelisassignedabitpattern.---torepresentablackandwhiteimage,1representswhitepixeland0representsblackone.---torepresentacolorimage,apixelisdecomposedintothreecolors(RGB).3ImagerepresentationForacolorimage,ea
3、chpixelhasthreebitpatterns:onetorepresenttheintensityoftheredcolor,onetorepresenttheintensityofthegreencolor,andonetorepresenttheintensityofthebluecolor.4ImagerepresentationVector---animageisdecomposedintoacombinationofcurvesandlines.---eachcurveorlinei
4、srepresentedbyamathematicalformula.Forexample,alinemaybedescribedbythecoordinatesofitsendpoints,andacirclemaybedescribedbythecoordinatesofitscenterandthelengthofitsradius.---theyusemuchlessstoragespacethanbitmapimages,butdonotlookasrealisticasbitmapimag
5、es.5WebgraphicimageformatAlthoughtherearedozensofgraphicfileformatsoutthereintheworld,onlythreearesupportedbywebbrowsersforuseonwebpages:GIF(pronounced“jiff”)JPEG(pronounced“jay-peg”)PNG(pronounced“ping”)6GIFTheGIF(GraphicInterchangeFormat)isthefirstfil
6、eformattobesupportedbywebbrowsers.GIFsareindexedcolorfileswithamaximum8-bitpalettecapacity,whichmeansthataGIFcancontainamaximumof256pixelcolors.GIFfilesaremostappropriateforgraphicsthatcontainareasofflatcolor,suchaslogos,cartoon-likeillustrations,icons,
7、andlineart.TransparentGIFscanbeused.AnimatedGIFscanbeused.7JPEGJPEG(JointPhotographicExpertsGroup)filescontain24-bitcolorinformation.YoucancontroltheamountofcompressionwhenyousaveanimageasaJPEG,soyoucanprioritizesmallerfilesizesorbetterimagequality,base
8、donyourneeds.Photographicimages,oranyimageswithsubtlegradationsofcolor,arebestsavedasJPEGfiles,becauseJPEGcompressionismostefficientoncontinuoustonesofcolor.8PNGUnlikeGIFandJPEG,PNG(PortableNetworkGraphic)wasdevelopedspecifically