mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-15 15:44:34 -04:00
Calculate addresses correctly if last TIFF strip is full
This commit is contained in:
parent
ec8cfcbb76
commit
f4852b11a8
1 changed files with 5 additions and 3 deletions
|
@ -94,7 +94,11 @@ int tif_pixel_plot(struct zint_symbol *symbol, char *pixelbuf) {
|
||||||
if (i != (strip_count - 1)) {
|
if (i != (strip_count - 1)) {
|
||||||
strip_bytes[i] = rows_per_strip * symbol->bitmap_width * 3;
|
strip_bytes[i] = rows_per_strip * symbol->bitmap_width * 3;
|
||||||
} else {
|
} else {
|
||||||
strip_bytes[i] = (symbol->bitmap_height % rows_per_strip) * symbol->bitmap_width * 3;
|
if ((symbol->bitmap_height % rows_per_strip) != 0) {
|
||||||
|
strip_bytes[i] = (symbol->bitmap_height % rows_per_strip) * symbol->bitmap_width * 3;
|
||||||
|
} else {
|
||||||
|
strip_bytes[i] = rows_per_strip * symbol->bitmap_width * 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
free_memory += strip_bytes[i];
|
free_memory += strip_bytes[i];
|
||||||
if ((free_memory % 2) == 1) {
|
if ((free_memory % 2) == 1) {
|
||||||
|
@ -102,8 +106,6 @@ int tif_pixel_plot(struct zint_symbol *symbol, char *pixelbuf) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Mem%d\n", free_memory);
|
|
||||||
|
|
||||||
if (free_memory > 0xffff0000) {
|
if (free_memory > 0xffff0000) {
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
free(strip_offset);
|
free(strip_offset);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue