mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Removed double increment of pointers in the accurate scaling.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
34f5449736
commit
af96543688
@@ -1808,9 +1808,9 @@ png_do_chop(png_row_infop row_info, png_bytep row)
|
|||||||
* later you will need to use the new png_set_scale_16_to_8()
|
* later you will need to use the new png_set_scale_16_to_8()
|
||||||
* API to obtain accurate 16-to-8 scaling.
|
* API to obtain accurate 16-to-8 scaling.
|
||||||
*/
|
*/
|
||||||
png_int_32 tmp = *sp++; /* must be signed! */
|
png_int_32 tmp = *sp; /* must be signed! */
|
||||||
tmp += (((int)*sp++ - tmp + 128) * 65535) >> 24;
|
tmp += (((int)sp[1] - tmp + 128) * 65535) >> 24;
|
||||||
*dp++ = (png_byte)tmp;
|
*dp = (png_byte)tmp;
|
||||||
#else
|
#else
|
||||||
/* Simply discard the low order byte */
|
/* Simply discard the low order byte */
|
||||||
*dp = *sp;
|
*dp = *sp;
|
||||||
|
|||||||
Reference in New Issue
Block a user