bit map file format

Upload: darshu36

Post on 14-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 Bit Map File Format

    1/9

    By: Darshika Desai

    ID: 09BCA24

    Bitmap File Format

    8/25/20131 09BCA24 Bitmap File Format

  • 7/30/2019 Bit Map File Format

    2/9

    Bitmap File Formats

    It is windows image format and its extension is.bmp.

    It supports only RGB color.

    Bitmap image format does not support animationsand not preferred for the internet application.

    8/25/20132 09BCA24 Bitmap File Format

  • 7/30/2019 Bit Map File Format

    3/9

    Bitmap file structure

    Each bitmap file contains

    A bitmap-file header,

    A bitmap-information header,

    A color-table, and

    A array of bytes that defines the bitmap bits.

    A .bmp file contains of the following data

    structures:

    BITMAPFILEHEADER bmfh; BITMAPINFOHEADER bmih;

    RGBQUAD AColors[];

    BYTE ABitmapBits[];

    8/25/20133 09BCA24 Bitmap File Format

  • 7/30/2019 Bit Map File Format

    4/9

    bmfh

    Header of bitmap file.

    bmih

    Header of bitmap information.

    AColor[]

    Color table.

    ABitmapBits[]

    Detail of the bits.

    8/25/20134 09BCA24 Bitmap File Format

  • 7/30/2019 Bit Map File Format

    5/9

    The detailed structure of the bitmap file in shownin following table:

    BitmapFileHeader

    Start

    Positio

    n

    Size

    (in

    bytes)

    Name of

    the Field

    Standard

    value

    Description

    1 2 bfType 19778 Signature of Bitmap file

    3 4 bfSize ?? Size of the file in bytes7 2 bfReserved

    1

    0 Reserved bit, always set to

    zero

    9 2 bfReserved

    2

    0 Reserved bit, always set to

    zero

    11 4 bfoffbits 1078 Specifies the offset from thebeginning of the file.

    8/25/20135 09BCA24 Bitmap File Format

  • 7/30/2019 Bit Map File Format

    6/9

    BitmapinfoHeader

    Start

    Position

    Size (in

    bytes)

    Name of

    Field

    Standard

    value

    Description

    15 4 BiSize 40 Size of the

    BITMAPINFOHEADE

    R structure

    19 4 BiWidth 100 Width of the image in

    pixel

    23 4 BiHeight 100 Height of the image in

    pixel

    27 2 BiPlanes 1 Number of planes of

    the target device

    29 2 biBitCount 8 Specifies the depth ofthe bits per pixel

    31 4 biCompresssi

    on

    0 Type of the

    compression.

    8/25/20136 09BCA24 Bitmap File Format

  • 7/30/2019 Bit Map File Format

    7/9

    Start

    Position

    Size (in

    bytes)

    Name of Field Standar

    d value

    Description

    35 4 biSizeImage 0 Size of the image in

    bytes

    39 4 biXPelsPerMet

    er

    0 Horizontal pixel per

    meter

    43 4 biYPelsPerMet

    er

    0 Vertical pixel per

    meter

    47 4 biClrUsed 0 The color depth

    used in the bitmap

    51 4 biCLrImportant 0 The number of the

    color that are

    important for the

    bitmap

    8/25/20137 09BCA24 Bitmap File Format

  • 7/30/2019 Bit Map File Format

    8/9

    RGBQuad of bitmap

    Start Size Name of the

    Field

    Description

    1 1 rgbBlue Blue part ofthe color

    2 1 rgbGreen Green part

    of the color

    3 1 rgbRed Red part of

    the color

    4 1 rgbReserved Reserved

    byte must be

    always set to

    zero

    8/25/20138 09BCA24 Bitmap File Format

  • 7/30/2019 Bit Map File Format

    9/9

    8/25/20139 09BCA24 Bitmap File Format