mirror of
https://github.com/codestation/mhtools
synced 2024-11-10 05:44:17 +00:00
fix: wrong size in gim header.
This commit is contained in:
parent
105d1505cf
commit
1643c90c45
1 changed files with 2 additions and 2 deletions
|
@ -191,7 +191,7 @@ public class Gim extends MHUtils {
|
||||||
if(palette == 0) {
|
if(palette == 0) {
|
||||||
imagedata = new byte[data_size - HEADER_SIZE];
|
imagedata = new byte[data_size - HEADER_SIZE];
|
||||||
palette_size = HEADER_SIZE;
|
palette_size = HEADER_SIZE;
|
||||||
size = HEADER_SIZE;
|
size = (HEADER_SIZE * 2) + data_size;
|
||||||
}
|
}
|
||||||
if(fill_palette(rgb, palette) < 0) {
|
if(fill_palette(rgb, palette) < 0) {
|
||||||
System.err.println("error, couldn't fill palette");
|
System.err.println("error, couldn't fill palette");
|
||||||
|
@ -199,7 +199,7 @@ public class Gim extends MHUtils {
|
||||||
}
|
}
|
||||||
palette_count += color_count;
|
palette_count += color_count;
|
||||||
palette_size += color_count * color_size;
|
palette_size += color_count * color_size;
|
||||||
size += data_size + palette_size;
|
size += color_count * color_size;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue