-
20140924 (비트맵 파일 구조)부산IT학원/스마트컨트롤러 2014. 9. 25. 09:12
145일차
-------------------
비트맵 파일 구조
-------------------
1. 파일 헤더
typedef struct tagBITMAPFILEHEADER
{
WORD bfType; // "BM"이라고 bitmap을 나타내는 값 저장됨
DWORD bfSize; // 바이트 단위로 전체 파일 크기
WORD bfReserved1; // 예약된 변수
WORD bfReserved2; // 예약된 변수
DWORD bfOffBits; // 실제 데이터 위치까지의 거리
}BITMAPFILEHEADER;
WORD (unsigned short) 2byte, DWORD (unsigned long) 4byte.
2. 이미지 헤더
typedef struct tagBITMAPINFOHEADER
{
DWORD biSize; // 이 구조체의 크기
LONG biWidth; // 픽셀 단위 이미지 폭
LONG biHeight; // 이미지 높이
WORD biPlanes; // 비트 플레인 수 (항상 1, 움직이는 그림은 다른수라 하던데..?)
WORD biBitCount; // 픽셀당 비트 수 (컬러, 흑백 구별)
DWORD biCompression; // 압축유무
DWORD biSizeImage; // 이미지 크기 (바이트 단위)
LONG biXPelsPermeter; // 가로 해상도
LONG biYPelsPermeter; // 세로 해상도
DWORD biClrUsed; // 실제 사용 색상 수
DWORD biClrImportant; // 중요한 색상 인덱스
}BITMAPINFOHEADER;
'부산IT학원 > 스마트컨트롤러' 카테고리의 다른 글
20140929 (C++ cout, cin, winapi로 영상 평활화 처리) (0) 2014.09.29 20140925 (0) 2014.09.25 20140827 (메시지 맵, strrev, strupr, toupper, strlwr, tolower, strchr, strstr, strtol, strtoul, strod) (0) 2014.08.27 20140826 (작성 중인 프로그램) (0) 2014.08.26 20140825 (다른 프로그램 실행 분석 프로그램 작성) (0) 2014.08.25