Bit blit (bitblt, blitting etc. ) is a computer graphics operation in which several bitmap patterns are combined into one using a "raster operator". Computer graphics are Graphics created by Computers and more generally the Representation and Manipulation of Pictorial Data In Computer graphics, a bitmap or pixmap is a type of memory organization or Image file format used to store Digital images The
Contents |
The name derives from the BitBLT machine instruction for the Xerox Alto computer, standing for "Bit Block Transfer". The Xerox Alto was an early Personal computer developed at Xerox PARC in 1973. A computer is a Machine that manipulates data according to a list of instructions. This operation was created by Dan Ingalls at Xerox PARC in late 1974 for the Smalltalk-72 system. Daniel Henry Holmes Ingalls Jr is a pioneer of object-oriented Computer programming and the principal architect, designer and implementor of PARC (Palo Alto Research Center Inc formerly Xerox PARC, is a Research and development company in Palo Alto California that began as a division of For the Smalltalk-74 system, Dan Ingalls implemented a redesigned version in microcode. Daniel Henry Holmes Ingalls Jr is a pioneer of object-oriented Computer programming and the principal architect, designer and implementor of Microprogramming (ie writing microcode) is a method that can be employed to implement Machine instructions in a CPU relatively easily often using less
The development of fast methods for various bit blit operations was key in the evolution of computer displays from using character graphics, to using bitmap graphics for everything. In Computer graphics, a raster graphics image or bitmap, is a Data structure representing a generally rectangular grid of Pixels Machines that rely heavily on the performance of 2D graphics (such as video game consoles) come with a special-purpose chip called a blitter. 2D computer graphics is the Computer -based generation of Digital images mdashmostly from two-dimensional models (such as 2D geometric models text and digital Microchipsjpg|right|thumb|200px|Microchips ( EPROM memory with a transparent window showing the integrated circuit inside In a Computer system a blitter is a Co-processor or a logic block on a Microprocessor that is dedicated to rapid data transfer within that computer's
A classic use for blitting is to render transparent sprites onto a background. Rendering is the process of generating an image from a model, by means of computer programs In Computer graphics, a sprite (also known by other names see Synonyms below is a two-dimensional/three-dimensional Image or Animation that It is usually not feasible to go through every pixel and find out if it needs to be displayed, due to considerations of speed. In Digital imaging, a pixel ( pict ure el ement is the smallest piece of information in an image For example, if we have the following background image:

and wish to display various sprites on top of it representing, for example, objects within a game to produce this:


What first is needed are the bitmaps for the sprites and the corresponding masks. In Computer science, a mask is data that is used for Bitwise operations. The colours are very important as the sprite background and the mask foreground are black, stored in binary as 0's. The mask background is white, stored in binary as 1's.
The first blit uses the raster operator of AND with the background and the mask of the sprites. In Computer programming, a bitwise operation operates on one or two Bit patterns or binary numerals at the level of their individual Bits On most Because any value ANDed with 0 equals 0, and any value ANDed with 1 is unchanged, we can create black areas where the actual sprites will appear, and leave the rest of the background alone.
The second blit uses the raster operator of OR with the altered background and the actual sprite. In Computer programming, a bitwise operation operates on one or two Bit patterns or binary numerals at the level of their individual Bits On most Because any value OR'd with 0 is unchanged, the background is unaffected and the black areas are filled with the actual sprite image.
It is also possible to achieve the same effect using a sprite with a white background and a white-on-black mask. In this case, the mask would be ORed first, and the sprite ANDed next.
Blitting is similar to hardware-sprite drawing, in that both systems reproduce a pattern, typically a square area, at different locations on the screen. In Computer graphics, a sprite (also known by other names see Synonyms below is a two-dimensional/three-dimensional Image or Animation that Sprites have the advantage of being stored in separate memory, and therefore don't disturb the main display memory. This allows them to be moved about the display, covering the "background", with no effect on it.
Blitting moves the same types of patterns about the screen, but does so by writing into the same memory as the rest of the display. This means every time the pattern is placed on the screen, the display "under" it is overwritten, or "damaged". It is up to the software to clean this damage up by blitting twice, once to remove the damage, and then again to place the bit in its new location. However, there are several ways to optimize this. If large areas of the screen are taken over by the patterns, it may be more efficient to blit the background to the screen instead of erasing each pattern individually. A variation involves dividing the screen into segments and erasing only the segments where patterns have been drawn on. This technique is known as dirty rectangles.
As one might imagine, this makes blitting significantly slower than sprite manipulation. However blitting has one very big advantage: there's no physical limit to the number of patterns you can blit, or to the size of the patterns. Thus you can use blitting to display anything on the screen, including simulating sprites (through the double-write pattern noted above), or even text.