Alphamask detection tweakage.

This commit is contained in:
Shyotl
2011-11-24 00:31:45 -06:00
parent 09f7136cf4
commit 08d2c17c65

View File

@@ -1749,7 +1749,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
// this to be an intentional effect and don't treat as a mask.
U32 midrangetotal = 0;
for (U32 i = 4; i < 11; i++)
for (U32 i = 2; i < 13; i++)
{
midrangetotal += sample[i];
}
@@ -1764,7 +1764,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
upperhalftotal += sample[i];
}
if (midrangetotal > length/16 || // lots of midrange, or
if (midrangetotal > length/48 || // lots of midrange, or
(lowerhalftotal == length && alphatotal != 0) || // all close to transparent but not all totally transparent, or
(upperhalftotal == length && alphatotal != 255*length)) // all close to opaque but not all totally opaque
{