}
}
- if ( !h.FindFirstUnusedColour(&rMask, &gMask, &bMask) )
+ if ( !h.FindFirstUnusedColour(&rMask, &gMask, &bMask, rMask, gMask, bMask) )
{
wxLogWarning(_("Too many colours in PNG, the image may be slightly blurred."));
if ( transparency == Transparency_Mask )
{
- FindMaskColour(lines, width, height,
- rMask, gMask, bMask);
+ if ( IsTransparent( a ) && ( ! ( rMask || gMask || bMask ) ) )
+ {
+ rMask = r;
+ gMask = g;
+ bMask = b;
+
+ FindMaskColour(lines, width, height, rMask, gMask, bMask );
+ }
}
else // transparency == Transparency_Alpha
{