tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
netpbm (was: [HEADS UP] png update to 1.5 branch)
On Fri, Jan 14, 2011 at 02:03:46PM +0100, Thomas Klausner wrote:
> ... (and probably one bug in there, see TODO).
The ToDo section should probably look like this:
{
int const sbitval = pm_maxvaltobits(MIN(maxval, pngMaxval));
png_color_8 sbit;
if (png_get_color_type(pngP, pngInfoP) & PNG_COLOR_MASK_COLOR) {
sbit.red = sbitval;
sbit.green = sbitval;
sbit.blue = sbitval;
} else
sbit.gray = sbitval;
if (verbose)
pm_message("Writing sBIT chunk with bits = %d", sbitval);
if (png_get_color_type(pngP, pngInfoP) & PNG_COLOR_MASK_ALPHA) {
sbit.alpha =
pm_maxvaltobits(MIN(alphaMaxval, pngMaxval));
if (verbose)
pm_message(" alpha bits = %d", sbit.alpha);
}
png_set_sBIT(pngP, pngInfoP, &sbit);
}
Kind regards
--
Matthias Scheler http://zhadum.org.uk/
Home |
Main Index |
Thread Index |
Old Index