adjust GIF alpha threshold

see https://github.com/libvips/libvips/discussions/2604
This commit is contained in:
John Cupitt 2021-12-31 20:20:56 +00:00
parent d3f77e4433
commit f75b3c1ee9
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
- change default frame delay for GIFs from 1s to 0.1s
- remove stray trailing comma from iiif3 dirnames [whalehub]
- fix TTF load [chregu]
- revise GIF save alpha threshold [jfcalvo]
21/11/21 started 8.12.1
- fix insert [chregu]

View File

@ -188,7 +188,7 @@ 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;
p[3] = p[3] >= 128 ? 255 : 0;
p += 4;
}