cgifsave: fill transparent pixels with zeroes (#2823)

This commit is contained in:
Sergey Alexandrovich 2022-05-26 22:23:04 +06:00 committed by GitHub
parent a96dd73648
commit ba04c5f03f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,7 +237,8 @@ vips_foreign_save_cgif_write_frame( VipsForeignSaveCgif *cgif )
*/
p = frame_bytes;
for( i = 0; i < n_pels; i++ ) {
p[3] = p[3] >= 128 ? 255 : 0;
if (p[3] >= 128) p[3] = 255;
else memset(p, 0, 4);
p += 4;
}