png_rgb_to_gray optimization fixes

This fixes the code that optimizes RGB to Gray transformations that only
selected on channel and clarifies the handling of max_depth in the transform
code.  It eliminates some UNTESTED cases and removes the write 'invert alpha'
UNTESTED macro because, while there are no test cases for it, code review
some months after writing it suggests it is ok.

Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
John Bowler
2015-09-24 17:33:32 -07:00
parent bf51c644f7
commit d394d889e1
5 changed files with 50 additions and 25 deletions

View File

@@ -1427,8 +1427,6 @@ png_write_tRNS(png_structrp png_ptr, png_const_bytep trans_alpha,
inverted_alpha.u32[i] = ~inverted_alpha.u32[i];
trans_alpha = inverted_alpha.b8;
UNTESTED
}
# endif /* WRITE_INVERT_ALPHA */