1.5.3beta06
Also removed a spurious (totally unused and confusing) member from png_info.
The palette expand optimization prevented expansion to an intermediate RGBA
form if tRNS was present but alpha was marked to be stripped; this exposed
a check for tRNS in png_do_expand_palette() which is inconsistent with the
code elsewhere in libpng.
wrong (high by one) 25% of the time. Dividing by 257 with rounding is
wrong in 128 out of 65536 cases. Getting the right answer all the time
without division is easy.
This problem is present in 1.5.2; if png_set_background is called with
need_expand false and the matching 16 bit color libpng erroneously just treats
it as an 8-bit color because of where png_do_expand_16 is in the transform
list. This simple fix reduces the supplied colour to 8 bits, so it gets
smashed, but this is better than the current behavior.
png_expand_16 back where it was before libpng-1.5.3beta07.
The change doesn't work because it requires 16 bit gamma tables when the code
only generates 8 bit ones. This fails silently; the libpng code just doesn't
do any gamma correction. Moving the tests back leaves the old, inaccurate, 8
bit gamma calculations, but these are clearly better than none!
libpng-manual.txt.
The cHRM chunk now sets the defaults for png_set_rgb_to_gray() (when negative
parameters are supplied by the caller), while in the absence of cHRM
sRGB/Rec 709 values are still used.
The bKGD chunk no longer overwrites the background value set by
png_set_background(), allowing the latter to be used before the file
header is read. It never performed any useful function to override
the default anyway.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit
This change adds internal APIs to allow png_warning messages to have parameters
without requiring the host OS to implelment snprintf. As a side effect the
dependency of the RFC1132 code on stdio is removed and PNG_NO_WARNINGS does
actually work now.
handling. Internal changes only except for a new option to avoid compiling
in the png_build_grayscale_palette API (which is not used at all internally.)
The main change is to move the transform tests (READ_TRANSFORMS,
WRITE_TRANSFORMS) up one level to the caller of the APIs.