else if (yres && !xres)
xres = yres;
if (xres) {
- i_tags_set_float(&im->tags, "i_xres", 0, xres * 0.0254);
- i_tags_set_float(&im->tags, "i_yres", 0, yres * 0.0254);
+ i_tags_set_float2(&im->tags, "i_xres", 0, xres * 0.0254, 4);
+ i_tags_set_float2(&im->tags, "i_yres", 0, yres * 0.0254, 4);
}
i_tags_addn(&im->tags, "bmp_compression", 0, compression);
i_tags_addn(&im->tags, "bmp_important_colors", 0, clr_important);
write_8bit_data(io_glue *ig, i_img *im) {
i_palidx *line;
int line_size = im->xsize;
- int x, y;
+ int y;
/* round up to nearest multiple of four */
line_size = (line_size + 3) / 4 * 4;
write_24bit_data(io_glue *ig, i_img *im) {
int *chans;
unsigned char *samples;
- int x, y;
+ int y;
int line_size = 3 * im->xsize;
line_size = (line_size + 3) / 4 * 4;
i_palidx *line, *p;
unsigned char *packed;
int line_size = (xsize + 7)/8;
- int byte, bit;
+ int bit;
unsigned char *in;
long base_offset;
}
else if (compression == BI_RLE4) {
int read_size;
- int want_high;
int count;
i_tags_add(&im->tags, "bmp_compression_name", 0, "BI_RLE4", -1, 0);
int compression, long offbits) {
i_img *im;
int x, y, lasty, yinc;
- i_palidx *line, *p;
+ i_palidx *line;
int line_size = xsize;
- unsigned char *in;
long base_offset;
line_size = (line_size+3) / 4 * 4;
}
else if (compression == BI_RLE8) {
int read_size;
- int want_high;
int count;
unsigned char packed[2];
i_img *im;
int x, y, lasty, yinc;
i_color *line, *p;
- unsigned char *in;
int pix_size = bit_count / 8;
int line_size = xsize * pix_size;
struct bm_masks masks;