diff --git a/include/image.cpp b/include/image.cpp index 9c74f1c71..37c3de81d 100755 --- a/include/image.cpp +++ b/include/image.cpp @@ -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); } }