mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.36beta02.tar
This commit is contained in:
@@ -455,10 +455,8 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
int num_green = (1 << PNG_DITHER_GREEN_BITS);
|
||||
int num_blue = (1 << PNG_DITHER_BLUE_BITS);
|
||||
png_size_t num_entries = ((png_size_t)1 << total_bits);
|
||||
|
||||
png_ptr->palette_lookup = (png_bytep )png_malloc(png_ptr,
|
||||
(png_uint_32)(num_entries * png_sizeof(png_byte)));
|
||||
|
||||
png_memset(png_ptr->palette_lookup, 0, num_entries *
|
||||
png_sizeof(png_byte));
|
||||
|
||||
@@ -4125,14 +4123,13 @@ png_build_gamma_table(png_structp png_ptr)
|
||||
|
||||
png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr,
|
||||
(png_uint_32)(num * png_sizeof(png_uint_16p)));
|
||||
png_memset(png_ptr->gamma_16_table, 0, num * png_sizeof(png_uint_16p));
|
||||
|
||||
if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND))
|
||||
{
|
||||
double fin, fout;
|
||||
png_uint_32 last, max;
|
||||
|
||||
png_memset(png_ptr->gamma_16_table, 0, num * png_sizeof(png_uint_16p));
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
|
||||
@@ -4187,7 +4184,6 @@ png_build_gamma_table(png_structp png_ptr)
|
||||
|
||||
png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr,
|
||||
(png_uint_32)(num * png_sizeof(png_uint_16p )));
|
||||
|
||||
png_memset(png_ptr->gamma_16_to_1, 0, num * png_sizeof(png_uint_16p));
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
@@ -4212,7 +4208,6 @@ png_build_gamma_table(png_structp png_ptr)
|
||||
|
||||
png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr,
|
||||
(png_uint_32)(num * png_sizeof(png_uint_16p)));
|
||||
|
||||
png_memset(png_ptr->gamma_16_from_1, 0,
|
||||
num * png_sizeof(png_uint_16p));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user