Patch level :2.1 042

Files correlati     :gestore immagini
Ricompilazione Demo : [ ]
Commento            :eliminato arrotondamento ad 8 nel caso di ridefinizione colori (preistorico)


git-svn-id: svn://10.65.10.50/trunk@12074 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2004-05-13 15:09:51 +00:00
parent e007d5e048
commit 036922ec70

View File

@ -265,7 +265,7 @@ void TImage::convert_transparent_color(COLOR transparent)
if (_image == NULL)
return; // Null image
const COLOR trans = get_pixel(0, 0) & 0x00FFFFFF;
const COLOR trans = get_pixel(0,0) & 0x00FFFFFF;
if (trans == (transparent & 0x00FFFFFF))
return; // Nothing to do
@ -284,7 +284,7 @@ void TImage::convert_transparent_color(COLOR transparent)
for (short y = 0; y < dy; y++) for (short x = 0; x < dx; x++)
{
const COLOR c = get_pixel(x, y);
if (color_distance(c, trans) < 8)
if ((c & 0x00FFFFFF) == trans)
set_pixel(x, y, transparent);
}
}