Alphamask detection tweakage.
This commit is contained in:
@@ -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.
|
// this to be an intentional effect and don't treat as a mask.
|
||||||
|
|
||||||
U32 midrangetotal = 0;
|
U32 midrangetotal = 0;
|
||||||
for (U32 i = 4; i < 11; i++)
|
for (U32 i = 2; i < 13; i++)
|
||||||
{
|
{
|
||||||
midrangetotal += sample[i];
|
midrangetotal += sample[i];
|
||||||
}
|
}
|
||||||
@@ -1764,7 +1764,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
|
|||||||
upperhalftotal += sample[i];
|
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
|
(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
|
(upperhalftotal == length && alphatotal != 255*length)) // all close to opaque but not all totally opaque
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user