Bit blit

Uses your system voice; voice and rate in settings.

Snapshot

≈ 5 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

Bit blit (also written BITBLT, BIT BLT, BitBLT, Bit BLT, Bit Blt etc., which stands for bit block transfer) is a data operation commonly used in computer graphics in which several bitmaps are combined into one using a boolean function. A two-bitmap form is called block transfer (BLT) in UEFI Graphics Output Protocol.

The operation involves at least two bitmaps: a "source" (or "foreground") and a "destination" (or "background"), and possibly a third that is often called the "mask". The result may be written to a fourth bitmap, though often it replaces the destination. The pixels of each are combined using a program-selectable raster operation, a bit-wise boolean formula.

The most obvious raster operation overwrites the destination with the source. Others may involve AND, OR, XOR, and NOT operations. The Commodore Amiga's graphics chipset (and others) could combine three source bitmaps using any of the 256 possible 3-input boolean functions.

Modern graphics software has almost completely replaced bitwise operations with more general mathematical operations used for effects such as alpha compositing. This is because bitwise operations on color displays do not usually produce results that resemble the physical combination of lights or inks.…

Bit blit (also written BITBLT, BIT BLT, BitBLT, Bit BLT, Bit Blt etc., which stands for bit block transfer) is a data operation commonly used in computer graphics in which several bitmaps are combined into one using a boolean function. A two-bitmap form is called block transfer (BLT) in UEFI Graphics Output Protocol.

The operation involves at least two bitmaps: a "source" (or "foreground") and a "destination" (or "background"), and possibly a third that is often called the "mask". The result may be written to a fourth bitmap, though often it replaces the destination. The pixels of each are combined using a program-selectable raster operation, a bit-wise boolean formula.

The most obvious raster operation overwrites the destination with the source. Others may involve AND, OR, XOR, and NOT operations. The Commodore Amiga's graphics chipset (and others) could combine three source bitmaps using any of the 256 possible 3-input boolean functions.

Modern graphics software has almost completely replaced bitwise operations with more general mathematical operations used for effects such as alpha compositing. This is because bitwise operations on color displays do not usually produce results that resemble the physical combination of lights or inks.

Some software still uses XOR to draw interactive highlight rectangles or region borders; when this is done to color images, the unusual resulting colors are easily seen.

Origins

The name derives from the BitBLT routine for the Xerox Alto computer, standing for bit-boundary block transfer. Dan Ingalls, Larry Tesler, Bob Sproull, and Diana Merry programmed this operation at Xerox PARC in November 1975 for the Smalltalk-72 system. Dan Ingalls later implemented a redesigned version in microcode.

The development of fast methods for various bit blit operations gave impetus to the evolution of computer displays from using character graphics (text mode) to using raster graphics (bitmap) for everything. Machines that rely heavily on the performance of 2D graphics (such as video game consoles) often have special-purpose circuitry called a blitter.

Blitting vs hardware sprites

Blitting is similar to hardware-sprite drawing, in that both systems reproduce a pattern, typically a square area, at different locations on the screen. Hardware 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 that every time a foreground pattern is placed on the screen, any background pixels underneath it are overwritten, or "damaged".

It is up to the software to repair this damage by blitting twice, once to restore the pixels that were changed, and then again to place the foreground pattern in its new location. One way to do it is to store the required patterns in VRAM offscreen and to reserve another area offscreen as a sort of stack to temporarily store the affected display section.

Assuming the graphics chip has dedicated VRAM this is useful to lessen the strain on system RAM but also the bandwidth limited ISA expansion slot on older PC systems. 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.

Xerox Inter-Office Memorandum 19 November 1975

Text derived from https://en.wikipedia.org/w/index.php?oldid=1370663758 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

3 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.