fix: wrong size in gim header.

This commit is contained in:
codestation 2011-10-01 18:27:26 -04:30
parent 105d1505cf
commit 1643c90c45

View file

@ -191,7 +191,7 @@ public class Gim extends MHUtils {
if(palette == 0) {
imagedata = new byte[data_size - HEADER_SIZE];
palette_size = HEADER_SIZE;
size = HEADER_SIZE;
size = (HEADER_SIZE * 2) + data_size;
}
if(fill_palette(rgb, palette) < 0) {
System.err.println("error, couldn't fill palette");
@ -199,7 +199,7 @@ public class Gim extends MHUtils {
}
palette_count += color_count;
palette_size += color_count * color_size;
size += data_size + palette_size;
size += color_count * color_size;
return true;
}