PDA

View Full Version : GIF, JPEG What do i save my graphics in...


p_hirani
01-09-2006, 12:30 PM
I am doing up a web page with a few pictures. When I preview the page in a browser and roll my cursor over the pictures, the save/print/send rectanglar box appears in each picture. I would like to know how can I get rid of that option?

Also, what is the best format (GIF,JPEG etc) to save graphics for the web in and why?

davidj
01-09-2006, 12:54 PM
the save/print/send rectanglar box appears in each picture. I would like to know how can I get rid of that option?

in IE goto...

[menu] > Tools > Internet Options > Advanced [tab]

scroll down to Multimedia section

uncheck Enable Image Toolbar

Q2

Also, what is the best format (GIF,JPEG etc) to save graphics for the web in and why?


GIF
GIF uses a lossless compression which means that no quality is lost in the compression. The uncompressed image stores its information in a linear fashion. Each line of pixels is read from left to right. An interlaced GIF file stores the lines of the image in a different order. First lines 4, 8, 12, 16 and 20 may be read in. Then lines 2, 6, 10, 14, and 18 and so on until the entire image is read. When the image is read in this way, a user with a slower internet connection may be able to understand or read the image before it has fully loaded.

The GIF format achieves its compression by removing repeated patterns within the GIF file and storing references to these sections in a list, also known as a hash. Images with horizontal lines of the same color or pattern benefit most from the GIF format. This would include images like background graphics, images with text and patterned images.

Another great advantage is the ability to create animated images. Youíve no doubt seen them throughout the internet. Especially if you were around for the heyday of the 90ís! An animated GIF is essentially a sequence of GIF files with some timing information included. Animated GIFs, however, can run into large file sizes awfully quickly and with very few frames of animation. While it may be a fairly ubiquitous format, if you have to do animation, you may be better off going with Macromedia Flash. If one frame is 15KB then 20 frames could suddenly find you well over 100KB just for one animated image.

Another advantage to GIF files is transparency. A color within the color table can be selected as the transparent color. In doing so, wherever that color occurs, youíll be able to see through to the HTML background. One of the largest downfalls to the GIF format is its inability to have a color palette of more than 256 colors. This can create poor looking images when used on a photograph which may originally have thousands of different colors.

JPEG
JPEG uses a lossy compression which means that image quality is lost in the process of compressing the image. JPEG compression works by first converting the image from RGB to YUV which stores information about each pixel using brightness, hue and saturation. Then it reduces the amount of information it stores for hue and saturation since differences are less noticeable to the human eye. In trying to decrease the file size of the JPEG (for example, when using the quality slider in Photoshop), you'll tend to notice artifacts occur in flat color areas and especially near edges. As a result, JPEG is best used for images that have more of a variation in colors. For example, images with gradients or photographs can handle a lower quality setting with little noticeable loss in quality. Images with text or large solid backgrounds are best left for GIF or PNG.

PNG
PNG is the relative newcomer to the list of available image formats and it is a formidable one. It is similar to GIF in many ways but even better in others. It is lossless like GIF but supports 24 bit color, unlike GIF which only supports 8. PNG supports alpha transparency, whereas GIF only supports one-color transparency. PNG uses various compression filters to minimize overall image size and can apply different filters on a per-line basis to achieve higher compression. The big attraction to PNGs is its ability to do alpha transparency. Unfortunately, Internet Explorer currently doesn't have full support for it, although there are hacks out there that can pull it off.

If you are not using alpha transparency or do not need more than 256 colors then exporting as an 8-bit PNG is the way to go. On average, 8-bit PNG will be smaller in file size than GIF with absolutely no difference in image quality. PNG and GIF are also very similar in that they both work better with large lines of the same pattern or color. If you do not need alpha transparency but wish to use a color palette greater than 256 colors then you are looking at a 24-bit PNG. It'll be important to test between a 24-bit PNG and JPEG to see which achieves better results. PNG still suffers the same problem as GIF in that they cannot optimize photographs as well as JPEG can.

Is there a winner?
No format is best in all scenarios. Therefore, it's always best to play around with the various formats and compression levels to achieve the best results.

p_hirani
01-09-2006, 01:22 PM
About the first question....


Oh I never knew it was in the internet settings. But that changes my settings, is there's nothing I can do to prevent the end user to save the pic's ???

Thanks for the quick reply.

djshongo
01-09-2006, 01:32 PM
there's javascript code that you put into your web pages which prevents end users copying your pics from your site.....

now your gonna ask me the code right?

i cant remember it!
i'll get it soon!

p_hirani
01-09-2006, 01:53 PM
yes please!

Oh by the way, I'm using Dreamweaver. Not so good with codes. So make it simple as possible.

davidj
01-09-2006, 01:53 PM
please dont use any disable right click javascript rubbish. They dont work and are a waste of time and effort

dont put anything on the internet you cant afford to loose

Creative Insanity
01-09-2006, 05:12 PM
I agree with dj, no rc is a joke as the image is in their cache anyway

domedia
01-09-2006, 05:20 PM
To prevent that image box coming up: <meta http-equiv="imagetoolbar" content="no">

As a general rule:
jpg - good for photos
gif - good for images with fewer colors, or images with areas of solid color.

p_hirani
01-13-2006, 03:31 PM
Thanks a lot guys,

i put the code in and it works fine.

thanks again