Bitmaps, Sprites and Textures: Difference between revisions

m
categories and general cleanup
m (Mass update links)
m (categories and general cleanup)
Line 14:
In its simplest form, a ''monochrome'' picture has actually two different colors: Usually black and white. If you take a black marker pen and draw on a white sheet of paper, you create such a monochrome picture. Each individual pixel can be black or white: Two possibilities, which can fit into a single bit of information. Your picture is now said to have ''one bit per pixel'', and this information is called the ''color depth''.
 
If you are satisfied with having only two colors but want something else than black and white (like, say, [http[wikipedia://en.wikipedia.org/wiki/File:Amstrad_CPC464Amstrad CPC464.jpg |bright yellow and dark blue]]), you need to add additional information to tell "A 'zero' bit is blue, a 'one' bit is yellow". This information is called a ''palette''. In our monochrome image, the palette has two ''entries''. Each pixel color bit is an ''index'' in the palette, that's why the picture is said to be ''indexed''.
 
But what if you want more than two colors? Well, a single bit can't hold that, then the solution is to use several bits for each pixel. If you decide to use ''two bits per pixel'', each pixel can now have one of four colors. Your palette will now have four entries.
Line 36:
''Lossless compression'' is compression that always preserves all the data. It's the only compression admissible for contents such as text, executable files, etc. The drawback is that there is absolutely no guarantee the data in question can be made smaller. A prime example of incompressible data is data that was already compressed. That's why if you add some GIF/JPEG/etc. pictures to a ZIP archive, you're likely to see their ''compression rate'' at 0% or 1%. That's not to say it's inappropriate for all pictures, though: Drawings with flat colors and text (think [[MS Paint]] and screenshots of office applications) benefit greatly from lossless compression. Picture formats such as GIF and PNG use lossless compression.
 
''Lossy compression'' is compression that sacrifices some data to compress better. This is acceptable mostly for pictures and sounds (and by extension video) and relies on the eye not "minding" a few minor differences with the original pictures (unless you sacrifice too much data and ruin the picture quality). The main advantage of lossy compression is that it can be set to sacrifice juuuuust as much data as it takes to fit some mold: This is called ''fixed-rate compression''. Time-critical applications such as audio and video absolutely love it, that's how you get audio/video data at ''X kilobits per seconds'' (meaning X/8 kilobytes). Video game graphics hardware is fond of that too: e. g., the [[Nintendo Gamecube]]'s graphics processor natively supports [http://en.[wikipedia.org/wiki/S3_Texture_Compression:S3 Texture Compression|S3 Texture Compression]]. However, it's inappropriate for pictures cited above: the ''compression artefacts'' engendered by the data loss will [[media:[[Compression Artefacts]]_7464CompressionArtefacts_7464.jpg|"pollute" the flat colors and blur the text]]. Picture formats such as JPEG use lossy compression.
 
== [[Sprites Textures And Transparency]] ==
Line 110:
 
{{reflist}}
[[Category:Bitmaps Sprites Andand Textures]]
[[Category:Sandbox]]