X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=bmp%2Fbmp.h;h=0741cd6c84c46069578ff8c3163979b5a5c34f7b;hb=b75390faa6d63ccc1a940bbe5db66141c8e0a1a0;hp=40e6df45f27390deda2ca0f30867d7bbea8083a4;hpb=0e23b0ff9632e31c6abc581b42b0efdff798af4c;p=my-code%2Fapi.git diff --git a/bmp/bmp.h b/bmp/bmp.h index 40e6df4..0741cd6 100644 --- a/bmp/bmp.h +++ b/bmp/bmp.h @@ -25,9 +25,10 @@ #define B_E_READ_DATA -8 #define B_E_WRITE_DATA -9 #define B_E_GEOMETRY -10 -#define MAX_CHARS_FILE 32 +#define MAX_CHARS_FILE 128 #define BMP_H_SIZE 14 #define BMP_I_SIZE 40 +#define GRAB 'g' /* bmp specific variables */ typedef struct s_bmp_hdr { @@ -53,9 +54,9 @@ typedef struct s_bmp_info { } __attribute__ ((packed)) t_bmp_info; /* 40 bytes */ typedef struct s_pixel { - unsigned char r; - unsigned char g; unsigned char b; + unsigned char g; + unsigned char r; } __attribute__ ((packed)) t_pixel; typedef struct s_bmp { @@ -78,7 +79,7 @@ int bmp_shutdown(t_bmp *bmp); int bmp_check_header_and_info(t_bmp *bmp); int bmp_alloc_map(t_bmp *bmp); int bmp_write_file(t_bmp *bmp); -int bmp_cut_bottom(t_bmp *dst,t_bmp *src,int dz); +int bmp_cut_grab_bottom(t_bmp *dst,t_bmp *src,int dz,unsigned char m); int bmp_read_file(t_bmp *bmp); #endif