|
Home : Tutorial Eleven Tutorial Eleven: ImagesImages
and File Structure
And now for the fun part. One of the main reasons the web has become so popular in such a short space of time has been interface - images in fact. Humans are visual beings - eyecandy attracts, inspires and creates a mood or impression. Just as a company will carefully consider a corporate brochure or presentation, so should you contemplate the overall visual appearance of your website. If you think using graphics means merely inserting a nice picture - think again. Graphics are used as illustrations, photographs, as backgrounds, navigational aids, bullets, headings, image maps, horizontal or vertical lines, or invisible layout element. Images And File StructureAs mentioned in Tutorial 2 it is important to develop a simple file structure - for images as well as html files. Unlike wordprocessing packages, images are not embedded into an html file. They are a seperate element that is linked to the document via the <img src> tag. It is easy to manage images if you place them in an image folder and keep to a set naming convention. We have already discussed file structure comprehensively in Tutorial 2 - remember to use either lower or uppercase and not both, keep name length to a sensible limit, and do not introduce other characters into the file names: an underscore or hyphen is allowable but no other punctuation marks or spaces as some servers will not understand these. Image AttributesThe <img> tag supports a number of attributes but does not require a closing tag as it is not a container.
In general, all or most of these attributes are used in combination such as in the following example:
The Clear AttributeThe clear attribute of the linebreak <br> tag was discussed briefly in a previous tutorial but can be demonstrated more clearly in the context of this topic. Strictly speaking this is not an HTML 4.0 element but may be used in place of CSS. Clear is only used when an image alignment is set to align="left" or align="right", in which case text normally wraps around it:
Vector Vs BitmapIf we simplified the graphics world we could talk about two major graphic types - bitmap (or raster) and vector. Most of the images on the web today are bitmap - created for the screen and not for print - however it is useful to be aware of the differences between both formats. Vector images are being introduced in new web media such as Macromedia Flash, a reasonably specialised field which will not be touched on in these tutorials. A vector image is created in an illustration program such as Adobe Illustrator, CorelDraw or Macromedia Freehand. Vector art relies on the ability of the computer to mathematically track each point of an image in relation to all other points. The benefits of this image creation method are:
A bitmap image is created in an image (or photo) editing program such as Adobe Photoshop, Corel Photopaint or JASC PaintShop Pro and is tracked by means of pixels rather than mathematical points - each pixels information is constantly stored, hence the larger file size. Graphics on computer screens are bitmaps because the screen is composed of pixels. Bitmaps can also be scanned into these programs as photographs or other artwork, captured from video or computer screens, or prepared from clipart.
Bandwidth ConsiderationsWith any of these programs web artwork should be saved in either gif or jpeg format - platform independent file formats which compress images to a manageable size. Web graphics must be compressed due to bandwidth considerations. Creating a website on your own computer can lead to misconceptions regarding download time. Once complete, every component that makes up a site is stored on the hard drive - it is already cached. Sounds, images, video and text all appear on screen quite quickly but this is not a true indication of what your audience will experience when they visit the website online. It is easy to neglect to check the overall file size of each page. At Monash, the internet connection is fast and reliable: if you are expecting outsiders to visit the page you must take into consideration the fact that they are unlikely to enjoy a similar circumstance. They may have slow modems, older browsers, slow connections or the net may be experiencing a slow down. As a general 'normal user - normal net traffic' rule of thumb it is reasonable to apply the 1 second/1k theory. Most web designers will deem it reasonable to expect visitors to wait around 30 seconds for a page to download completely - meaning a limit of 30k. That's 30k for all graphics and html on each page. Granted, this is often difficult to adhere to, nonetheless it is a good yardstick. For a simple test, upload your website to the webserver. Clear your browser cache: Internet
Explorer: View > Internet Options > General > Delete Temporary
Internet Files This will force your browser to download the entire web page into its cache, or temporary storage area, as though it had never visited the site before. Try this approach from other systems outside the University, and ask others to 'test drive' the site from home and work. ResolutionPreparing images for the web is very unlike preparing them for print, which requires high quality, high resolution. Resolution refers to the number of colored dots squeezed into 1 inch, or dpi (dots per inch). High end printers are capable of outputting at 1200dpi while the average home printer 300-600dpi. Web graphics are designed for screen resolution and therefore should be saved at the same resolution as standard monitors - 72dpi. If they are saved at higher resolutions they will appear much larger than intended, as well as increasing in file size. Bit-Depth and DitheringBit-depth is one of the most important concepts in web building - in particular in relation to the GIF compression format which will be discussed next. Bit-Depth refers to the number of colors in an image, or indeed the number of colors a monitor is able to display.
Most
new monitors are set to thousands or millions of colors but there
are many users still operating systems under a 256 color limitation.
Images created in millions of colors will not look the same on these
monitors due to dithering - the computers attempt to match
colors it is not capable of displaying. Sometimes it makes a good
guess and sometimes not, often resulting in an image that appears
dotty, the odd spots being guessed substitute colors. The limited
or indexed palette of 256 colors required by the GIF format goes some
way to addressing this problem, however there is still some variation
across platforms, browsers and monitors which requires web art to
be further indexed to 216 colors guaranteed not to dither - the websafe
palette mentioned in Tutorial 4.
GIF (Graphic Interchange Format)
JPEG (Joint Photographic Experts Group)The name alone provides a clue as to the purpose of JPEGs - photographs. The JPEG format does not work well with flat colored images. On the other hand it does not reduce to a limited color palette, offering 24-bit or 16.7 million color instead: there is no need to use a web-safe palette because enough colors stay in the image to not cause any problems with dithering. This is a compression format that does result in some loss of detail - data is taken out of the image according to the percentage of compression introduced. This is one reason it is important for your graphics program to offer a preview of some sort allowing you to 'play around' until a suitable result is achieved. Web designers tread a fine line in trying to reduce file size without causing traumatic image distortion. Never save a JPEG again as a JPEG - everytime you do so more information is removed from the image, resulting in an unfavourable outcome. Keep your original image and it can be saved in any format as many times as necessary. Progressive JPEGS employ a concept similar to GIF interlacing whereby the image decompresses in the browser gradually (GIFS do not require decompression however). There are times when making the decision to use either GIF or JPEG is difficult. It is a matter of determining the best visual outcome with the smallest file size.
PNG (Portable Network Graphic)Although not as widely supported as JPEG and GIF, mention should be made of this newer web graphic format, ticketed as a replacement for GIF, although it does not allow animation. It is a lossless, superior compression method that can support different bit-depths (8, 24 or 32), a more advanced method of interlacing (the image unravels faster), multi-channel transparency and inbuilt MAC/PC platform information that automatically corrects gamma, a parameter that affects the contrast in the midtone range, without causing much disturbance to highlights and shadows. PC's typically display an image darker than Macs and web designers usually have to take this into consideration.ConclusionThis is the final Tutorial in this series. You should now have enough information to confidently create or enhance your own web page. Recapping the main point in many of the tutorials, the best advice that can be given to anyone attempting to create a website is to test, test and test again. Design web pages with the audience in mind, resist the urge to flaunt every color and font known to man, and make sure the message you are trying to convey is clear and concise. And good luck! Home : r.e.t.r.o.c.i.t.y Main Page This tutorial series was authored by Wendy Phillips It is copyrighted which means you may not pinch any of it |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||