Multiply RGB when reading image with unassociated alpha
This commit is contained in:
		| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user