8/15/2023 0 Comments Bitmap graphics examples![]() ![]() Color JPEG images store 24 bits per pixel, so they are capable of displaying more than 16 million colors. Some information is lost in the compression process, but often the loss is imperceptible to the human eye. JPEG is a compression scheme that works well for natural scenes, such as scanned photographs. GIFs store at most 8 bits per pixel, so they are limited to 256 colors. A sequence of GIF images can be stored in a single file to form an animated GIF. One color in a GIF can be designated as transparent, so that the image will have the background color of any Web page that displays it. GIFs are compressed, but no information is lost in the compression process a decompressed image is exactly the same as the original. GIFs work well for line drawings, pictures with blocks of solid color, and pictures with sharp boundaries between colors. GIF is a common format for images that appear on Web pages. ![]() BMP files with 24 bits per pixel are common. The number of bits per pixel (1, 4, 8, 15, 24, 32, or 64) for a given BMP file is specified in a file header. Windows GDI+ supports the graphics file formats described in the following paragraphs.īMP is a standard format used by Windows to store device-independent and application-independent images. There are many standard formats for saving bitmaps in files. In the bitmap, FFFFFF represents white, FF0000 represents red, 00FF00 represents green, and 0000FF represents blue. The illustration also shows an enlarged view of the corresponding image. The following illustration shows a bitmap that stores colors directly (24 bits per pixel) rather than using a color table. For example, if a bitmap uses 24 bits per pixel, that bitmap can store the colors themselves rather than indexes into a color table. Some bitmaps have no need for a color table. Some bitmaps are stored in bottom-up format the numbers in the first row of the bitmap correspond to the pixels in the bottom row of the image.Ī bitmap that stores indexes into a color table is called a palette-indexed bitmap. The color table tells us that 3 represents blue, so all the pixels in the top row of the image are blue. All the entries in the top row of the bitmap are 3. The color table tells us that 1 represents the color red, so the pixel is red. The corresponding number in the bitmap is 1. Look at the pixel in row 3, column 5 of the image. ![]() The numbers are shown in hexadecimal (base 16) form: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. Each color in the table is represented by a 24-bit number: 8 bits for red, 8 bits for green, and 8 bits for blue. Each pixel is represented by a 4-bit number, so there are 2^4 = 16 colors in the color table. ![]() The following illustration shows an enlarged image along with its bitmap and color table. A color table maps numbers in the bitmap to specific colors. Such a file might also contain a color table (sometimes called a color palette). Number of colors that can be assigned to a pixelĭisk files that store bitmaps usually contain one or more information blocks that store information such as number of bits per pixel, number of pixels in each row, and number of rows in the array. The following table shows a few examples of the number of colors that can be assigned to a pixel represented by a given number of bits. For example, if each pixel is represented by 4 bits, then a given pixel can be assigned one of 16 different colors (2^4 = 16). The number of bits devoted to an individual pixel determines the number of colors that can be assigned to that pixel. A bitmap is an array of bits that specifies the color of each pixel in a rectangular array of pixels. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |