Multiply RGB when reading image with unassociated alpha
This commit is contained in:
parent
1c667f4128
commit
d278d7ee55
@ -606,6 +606,12 @@ internal void read_strips(TiffReader *reader) {
|
||||
p->a = 255;
|
||||
} else {
|
||||
fread_with_offset(reader->fp, &(p->a), 1, alpha_offset);
|
||||
|
||||
if (alpha.type == ALPHA_TYPE_UNASSOCIATED) {
|
||||
p->r *= p->a;
|
||||
p->g *= p->a;
|
||||
p->b *= p->a;
|
||||
}
|
||||
}
|
||||
|
||||
++position;
|
||||
|
Loading…
Reference in New Issue
Block a user