Last active
April 14, 2021 14:22
-
-
Save HyodaKazuaki/78bba8b293c86577ccf89e5307a9f825 to your computer and use it in GitHub Desktop.
bmp画像ライブラリの修正
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- bmp.h.orig 2021-04-14 22:59:35.890000000 +0900 | |
+++ bmp.h 2021-04-14 23:21:32.450000000 +0900 | |
@@ -24,17 +24,17 @@ unsigned char Bmp_headbuf[HEADERSIZE];/* | |
unsigned char Bmp_Pallet[PALLETSIZE]; /* カラーパレットを格納 */ | |
char Bmp_type[2]; /* ファイルタイプ "BM" */ | |
-unsigned long Bmp_size; /* bmpファイルのサイズ (バイト) */ | |
+uint32_t Bmp_size; /* bmpファイルのサイズ (バイト) */ | |
unsigned int Bmp_info_header_size; /* 情報ヘッダのサイズ = 40 */ | |
unsigned int Bmp_header_size; /* ヘッダサイズ = 54*/ | |
-long Bmp_height; /* 高さ (ピクセル) */ | |
-long Bmp_width; /* 幅 (ピクセル) */ | |
+int32_t Bmp_height; /* 高さ (ピクセル) */ | |
+int32_t Bmp_width; /* 幅 (ピクセル) */ | |
unsigned short Bmp_planes; /* プレーン数 常に 1 */ | |
unsigned short Bmp_color; /* 色 (ビット) 24 */ | |
-long Bmp_comp; /* 圧縮方法 0 */ | |
-long Bmp_image_size; /* 画像部分のファイルサイズ (バイト) */ | |
-long Bmp_xppm; /* 水平解像度 (ppm) */ | |
-long Bmp_yppm; /* 垂直解像度 (ppm) */ | |
+uint32_t Bmp_comp; /* 圧縮方法 0 */ | |
+uint32_t Bmp_image_size; /* 画像部分のファイルサイズ (バイト) */ | |
+int32_t Bmp_xppm; /* 水平解像度 (ppm) */ | |
+int32_t Bmp_yppm; /* 垂直解像度 (ppm) */ | |
typedef struct { /* 1ピクセルあたりの赤緑青の各輝度 */ | |
unsigned char r; | |
@@ -43,8 +43,8 @@ typedef struct { /* | |
} color; | |
typedef struct { | |
- long height; | |
- long width; | |
+ int32_t height; | |
+ int32_t width; | |
color data[MAXHEIGHT][MAXWIDTH]; | |
} img; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment