AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
October 2007

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2007.10.05 14:39 "Color issues in Tiff2pdf", by Richard Nolde
2007.10.05 16:46 "Re: Color issues in Tiff2pdf", by Frank Warmerdam

2007.10.05 14:39 "Color issues in Tiff2pdf", by Richard Nolde

Regarding color issues with tiff2pdf, the following may or may not be 
related but it is a bug that could be patched. The line numbers are 
appropriate for the tiff-3.8.2 version of tiff2pdf.c.  In personal 
correspondence with the author of the software, Ross Finlayson, he 
agreed that the assignment for the alpha channel info is incorrect.

extract from note to Ross:

"I think there is a typo at line 1486 in the current distribution where 
it appears that the alpha channel overwrites the blue channel in RGBA 
images.
Should the final line have (i * 4) + 3 instead of (i * 4 ) + 2?

       for(i=0;i<t2p->pdf_palettesize;i++){
           t2p->pdf_palette[(i*4)]  = (unsigned char) (r[i]>>8);
           t2p->pdf_palette[(i*4)+1]= (unsigned char) (g[i]>>8);
           t2p->pdf_palette[(i*4)+2]= (unsigned char) (b[i]>>8);
           t2p->pdf_palette[(i*4)+2]= (unsigned char) (a[i]>>8);
       }
"

Richard Nolde