--- oup/current/Global/OniImgClass.pas 2007/03/23 00:58:09 118 +++ oup/current/Global/OniImgClass.pas 2007/03/23 17:14:40 127 @@ -589,10 +589,15 @@ var size: Integer; x, y: Word; bpp: Byte; + minside: Byte; begin + minside := 1; case Self.FStoreType of 9: - bpp := 8; + begin + bpp := 4; + minside := 4; + end; 0, 1, 2: bpp := 16; 8: @@ -610,8 +615,16 @@ begin repeat x := x div 2; y := y div 2; - size := (size + x * y * bpp) div 8; - until (x = 1) or (y = 1); + size := size + (x * y * bpp) div 8; + until (x = minside) or (y = minside); + if FStoreType = 9 then + begin + repeat + x := x div 2; + y := y div 2; + size := size + (x * y * 16) div 8; + until (x = 1) or (y = 1); + end; end; Result := size; end;