Darren Null
09-27-2009, 9:04 PM
JPG
This is used for absolutely everything on the internet. It is the absolute best way of delivering photograph-style pictures in the least filesize. As an example, the attachment alaskanaa.jpg is 104Kb. The same image in a BMP is 747Kb; a TIF 770Kb and a PNG 369Kb.
Disadvantages:
JPG is a lossy format. It gains you the stupendous filesize savings by literally throwing away information that you won't notice, with a bit of luck. When you save an image as a JPG, you usually get a sliding bar with the amount of compression to use. If you use too much, you get artifacts alaskanab.jpg (bits that were not part of the original image) and your image will look awful; particularly around hard edges in the image. Also, JPGs get very cranky if you try to get them bigger than 30,000 pixels in any dimension.
You might not know this:
You can save clipping paths as part of your JPG. So you can open it in Photoshop (for example) and -if some kind soul has clipped the subject out for you- you can easily extract the bit you need from the image.
GIF
...is an odd one. It uses a limited palette of colours (up to 256) which is an advantage and a disadvantage, depending upon whether you use it properly. Gif also has transparency, but the GIF transparency isn't really worth using these days (see PNG). Used properly -if you have an image with few colours in it, like a logo- you can gain significant savings in filesize over even a JPG. Example gpl.gif at 6.6Kb isn't significantly different to gpl.jpg, weighing in at 33.4Kb.
Disadvantages:
Gif won't win with a photograph though. You either have to use all 256 colours, in which case the file will be bigger than a JPG; or you don't use enough, and end up with the '80s porn look': alaskanaa.gif.
You might not know this:
Because of the limited colour palette, you can use the GIF format to generate patterns for low-fi projects like cross-stitch and mosaics. Let's say you want an elephant picture on the bottom of your pool.
1) Find your image, work out how many tiles will be needed for your pool and resize accordingly. elephant1.jpg. I can get 500x397 tiles in the bottom of my pool.
2) Work out how many colours you want to work with. I reckon my elephant looks OK in 4 colours, so I save it as a GIF using 4 colours. elephant2.gif
2a) Whilst saving as a gif; screen capture the colour table (printscreen button; then FILE --> NEW --> EDIT --> PASTE in the graphics editor that you have open because you're saving an elephant picture in it). elephant3.jpg. Print that out, because that's what you take to the shops to match up the colour of your tiles/wool/whatever
3) Zoom in on your elephant picture and you have a map of where your tiles/stitches should be. elephant4.gif- next post. There are a variety of ways of dealing with your map now: You can attempt to synchronise printing to graph paper; you can print out the image REALLY BIG over lots of sheets of paper and mark the coordinates in by hand. What I have done in the past is to dice the image into chunks (square metre of pool bottom, say), import it into coreldraw and put a labelled grid over it. How to do that is a little beyond the scope of what was intended as a simple tutorial.
This is used for absolutely everything on the internet. It is the absolute best way of delivering photograph-style pictures in the least filesize. As an example, the attachment alaskanaa.jpg is 104Kb. The same image in a BMP is 747Kb; a TIF 770Kb and a PNG 369Kb.
Disadvantages:
JPG is a lossy format. It gains you the stupendous filesize savings by literally throwing away information that you won't notice, with a bit of luck. When you save an image as a JPG, you usually get a sliding bar with the amount of compression to use. If you use too much, you get artifacts alaskanab.jpg (bits that were not part of the original image) and your image will look awful; particularly around hard edges in the image. Also, JPGs get very cranky if you try to get them bigger than 30,000 pixels in any dimension.
You might not know this:
You can save clipping paths as part of your JPG. So you can open it in Photoshop (for example) and -if some kind soul has clipped the subject out for you- you can easily extract the bit you need from the image.
GIF
...is an odd one. It uses a limited palette of colours (up to 256) which is an advantage and a disadvantage, depending upon whether you use it properly. Gif also has transparency, but the GIF transparency isn't really worth using these days (see PNG). Used properly -if you have an image with few colours in it, like a logo- you can gain significant savings in filesize over even a JPG. Example gpl.gif at 6.6Kb isn't significantly different to gpl.jpg, weighing in at 33.4Kb.
Disadvantages:
Gif won't win with a photograph though. You either have to use all 256 colours, in which case the file will be bigger than a JPG; or you don't use enough, and end up with the '80s porn look': alaskanaa.gif.
You might not know this:
Because of the limited colour palette, you can use the GIF format to generate patterns for low-fi projects like cross-stitch and mosaics. Let's say you want an elephant picture on the bottom of your pool.
1) Find your image, work out how many tiles will be needed for your pool and resize accordingly. elephant1.jpg. I can get 500x397 tiles in the bottom of my pool.
2) Work out how many colours you want to work with. I reckon my elephant looks OK in 4 colours, so I save it as a GIF using 4 colours. elephant2.gif
2a) Whilst saving as a gif; screen capture the colour table (printscreen button; then FILE --> NEW --> EDIT --> PASTE in the graphics editor that you have open because you're saving an elephant picture in it). elephant3.jpg. Print that out, because that's what you take to the shops to match up the colour of your tiles/wool/whatever
3) Zoom in on your elephant picture and you have a map of where your tiles/stitches should be. elephant4.gif- next post. There are a variety of ways of dealing with your map now: You can attempt to synchronise printing to graph paper; you can print out the image REALLY BIG over lots of sheets of paper and mark the coordinates in by hand. What I have done in the past is to dice the image into chunks (square metre of pool bottom, say), import it into coreldraw and put a labelled grid over it. How to do that is a little beyond the scope of what was intended as a simple tutorial.