if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
comp = tmp2; // compression method
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
- image_size = tmp2; // bitmap data size
+ if (tmp2 <= image_size) image_size = tmp2; // bitmap data size, GIMP can handle image size error
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
//hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
comp = tmp2; // compression method
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
- image_size = tmp2; // bitmap data size
+ if (tmp2 <= image_size) image_size = tmp2; // bitmap data size, GIMP can handle image size error
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
//hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
comp = tmp2; // compression method
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
- image_size = tmp2; // bitmap data size
+ if (tmp2 <= image_size) image_size = tmp2; // bitmap data size, GIMP can handle image size error
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
//hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
comp = tmp2; // compression method
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
- image_size = tmp2; // bitmap data size
+ if (tmp2 <= image_size) image_size = tmp2; // bitmap data size, GIMP can handle image size error
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;
//hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter
if (!read_int(map, fsize, &position, &tmp2)) goto close_file;