#266491 netpbm: giftopnm produces incorrect alpha map

Package:
netpbm
Source:
netpbm-free
Description:
Graphics conversion tools between image formats
Submitter:
Nigel Williams
Date:
2024-01-01 12:39:06 UTC
Severity:
normal
#266491#5
Date:
2004-08-18 00:29:19 UTC
From:
To:
giftopnm generates an alpha map based on pixel colour, not on the colourmap
index of that pixel. e.g. the colourmap contains two entries, both with RGB
0/0/0. The Gif89a header says that one of them is transparent. giftopnm will
mark pixels using both of those colourmap indices as transparent.

#266491#10
Date:
2004-08-29 15:25:22 UTC
From:
To:
tags 266491 -patch
thanks

Hi,

thank you very much for your bug report. However, your patch


| diff -r -u3 netpbm-free-9.20/pnm/giftopnm.c netpbm-free-9.20-gif-alpha-fix/pnm/giftopnm.c
| --- netpbm-free-9.20/pnm/giftopnm.c	Sun Oct  7 21:09:35 2001
| +++ netpbm-free-9.20-gif-alpha-fix/pnm/giftopnm.c	Tue Aug 17 06:07:38 2004
| @@ -524,7 +524,7 @@
|
|
|  static void
| -ReadImage(FILE *fd, pixel ** const image, const int len, const int height,
| +ReadImage(FILE *fd, pixel ** const image, bit ** const alpha, const int len, const int height,
|            unsigned char cmap[3][MAXCOLORMAPSIZE], const int interlace) {
| [...]

applys only against the version in woody. In sid, this code is more or
less a re-write. I'm sorry, but I can't apply your patch at all any
more. It would be greate if you can forward-port your fix.


Thanks for your submission.


Cheers,
Andi

#266491#17
Date:
2006-08-17 07:41:44 UTC
From:
To:
Here's another fix for the bug, this time against the unstable
version.

#266491#22
Date:
2024-01-01 12:36:41 UTC
From:
To:
[...]

Hello Nigel,

could you please doublecheck whether the problem is still present in
recent (11.x) versions?

cu Andreas