format conversion

 
 What is pixel format conversion?

Pixel format conversion is performed when pixel data in one format is converted to another format. An example of this is converting an array of 16bit RGB565 pixels to an array of 32bit ARGB8888 pixels.

Pixel format conversion has traditionally been used as an initialization step: textures, sprites and other pixel data is loaded then converted on startup to the display pixel format. The use of pixel format conversion in other areas of programs has been limited because it was considered slow.

PTC takes pixel format conversion to the next level. With PTC pixel format conversion is extremely fast, so fast that you can work independantly of the display format in a virtual display mode.
 
 
 Supported pixel format conversions

PTC has a set of ultra fast pixel format conversion routines based on three source formats: INDEX8, RGB565 and ARGB8888. From each of these source formats PTC can convert to any of the following formats: ARGB8888, ABGR8888, ABGR8888, BGRA8888, RGBA8888, RGB888, BGR888, RGB565, BGR565, ARGB1555, ABGR1555, RGB332, GREY8, and 9 VGA truecolor emulation modes.

PTC also has a set of more generic conversion routines to handle conversions not listed above.
 
 
 Ease of use

The best thing about PTC's pixel format conversion routines is that they are totally transparent. If you BitBlt between two surfaces of a different pixel format the conversion is performed automatically, the same happens when you update to the display. PTC is that easy to use.