2009년 10월 9일 금요일

BMP 파일 구조

비트맵 파일 헤더 (Bitmap File Header)

비트맵 인포헤더 (Bitmap Info Header)

팔레트 (Pallette)

이미지 데이터

 

typedef struct tagBITMAPFILEHEADER {

WORD bfType;        // BM 이라고 써있으면 bmp

DWORD bfSize;        // 이미지 크기

WORD bfReserved1;

WORD bfReserved2;

DWORD bfOffBits;    // 이미지 데이터가 있는 곳의 포인터

} BITMAPFILEHEADER

 

typedef struct tagBITMAPINFOHEADER{

DWORD biSize;        // 현 구조체의 크기

LONG biWidth;        // 이미지의 가로 크기

LONG biHeight;        // 이미지의 세로 크기

WORD biplanes;        // 플레인수

WORD biBitCount;    // 비트 수

DWORD biCompression;    // 압축 유무

DWORD biSizeImage;    // 이미지 크기

LONG biXPelsPerMeter;    // 미터당 가로 픽셀

LONG biYPelsPerMeter;    // 미터당 세로 픽셀

DWORD biClrUsed;    // 컬러 사용 유무

DWORD biClrImportant;    // 중요하게 사용하는 색

} BITMAPINFOHEADER;

댓글 없음:

댓글 쓰기