Friday, 9 May 2008

vector vs. bitmap

dealing with file size is another problem for me. as before this, i will be more concern on the quality of the image instead of the file size. for instance, my negotiated project, the brain. the whole site is so heavy in file size!! one of the top 10 reasons that bad interactivity is long loading time!! and this makes user to click the BACK button.

"vector graphics" and "bitmap graphics" are the two most popular types of graphics in the World. Flash is, of course, capable of rendering both of them, however, since the two types are in many ways each other's opposites, they should be used in different situations.

Bitmaps
When you go to a website and see a static image, there is 99 percent chance that it is a bitmap. Bitmaps (a synonym is: raster images) are made up of pixels - dots lined up next to each other in a grid that represent what you can see on the screen.

Storing and scaling
These are often big flaws to bitmaps. Consider this: an image 1000 by 1000 pixels has 1000 000 pixels (one mega-pixel), apart from the RGB (Red Green Blue) value must be stored for each pixel. That means there are 3000 000 pieces of information contained in the image. That's quite a lot, isn't it?

Now, scaling. It is problematic, too. If you decide to scale up an image, additional pixels are added, thus decreasing the quality of the bitmap. So, you should always keep a copy of your original image.

Vectors

Vectors graphics are what Flash users love about Flash! :-)

One thing that makes this type of image so distinctive is it is composed of lines and shapes and other geometrical primitives. The position, scale, width and other properties are based on mathematical formulas, which means vector graphics are usually smaller in size and have better quality than bitmaps. Moreover, scaling doesn't effect their quality.

so, in my coming interactive site. i'm going to make my file size smaller and try not to keep user wait so long.

No comments: