15 #ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
19 #ifdef PNG_WRITE_SUPPORTED
21 #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
27 if (
info_ptr->unknown_chunks_num != 0)
34 up < info_ptr->unknown_chunks +
info_ptr->unknown_chunks_num;
41 #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
57 ((up->
name[3] & 0x20) ||
86 png_debug(1,
"in png_write_info_before_PLTE");
96 #ifdef PNG_MNG_FEATURES_SUPPORTED
98 png_ptr->mng_features_permitted != 0)
101 "MNG features are not allowed in a PNG datastream");
102 png_ptr->mng_features_permitted = 0;
131 #ifdef PNG_GAMMA_SUPPORTED
132 # ifdef PNG_WRITE_gAMA_SUPPORTED
133 if ((
info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 &&
134 (
info_ptr->colorspace.flags & PNG_COLORSPACE_FROM_gAMA) != 0 &&
140 #ifdef PNG_COLORSPACE_SUPPORTED
144 # ifdef PNG_WRITE_iCCP_SUPPORTED
145 if ((
info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 &&
148 # ifdef PNG_WRITE_sRGB_SUPPORTED
151 "profile matches sRGB but writing iCCP instead");
157 # ifdef PNG_WRITE_sRGB_SUPPORTED
162 # ifdef PNG_WRITE_sRGB_SUPPORTED
163 if ((
info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 &&
169 #ifdef PNG_WRITE_sBIT_SUPPORTED
174 #ifdef PNG_COLORSPACE_SUPPORTED
175 # ifdef PNG_WRITE_cHRM_SUPPORTED
176 if ((
info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 &&
177 (
info_ptr->colorspace.flags & PNG_COLORSPACE_FROM_cHRM) != 0 &&
183 #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
194 #if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
212 #ifdef PNG_WRITE_tRNS_SUPPORTED
215 #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
226 for (
j = 0;
j<jend; ++
j)
228 (png_byte)(255 -
info_ptr->trans_alpha[
j]);
235 #ifdef PNG_WRITE_bKGD_SUPPORTED
240 #ifdef PNG_WRITE_eXIf_SUPPORTED
245 #ifdef PNG_WRITE_hIST_SUPPORTED
250 #ifdef PNG_WRITE_oFFs_SUPPORTED
256 #ifdef PNG_WRITE_pCAL_SUPPORTED
263 #ifdef PNG_WRITE_sCAL_SUPPORTED
269 #ifdef PNG_WRITE_pHYs_SUPPORTED
275 #ifdef PNG_WRITE_tIME_SUPPORTED
283 #ifdef PNG_WRITE_sPLT_SUPPORTED
285 for (
i = 0;
i < (int)
info_ptr->splt_palettes_num;
i++)
289 #ifdef PNG_WRITE_TEXT_SUPPORTED
293 png_debug2(2,
"Writing header text chunk %d, type %d",
i,
298 #ifdef PNG_WRITE_iTXt_SUPPORTED
319 #ifdef PNG_WRITE_zTXt_SUPPORTED
332 #ifdef PNG_WRITE_tEXt_SUPPORTED
347 #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
368 #ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
376 #ifdef PNG_WRITE_TEXT_SUPPORTED
379 #ifdef PNG_WRITE_tIME_SUPPORTED
386 #ifdef PNG_WRITE_TEXT_SUPPORTED
390 png_debug2(2,
"Writing trailer text chunk %d, type %d",
i,
395 #ifdef PNG_WRITE_iTXt_SUPPORTED
415 #ifdef PNG_WRITE_zTXt_SUPPORTED
428 #ifdef PNG_WRITE_tEXt_SUPPORTED
441 #ifdef PNG_WRITE_eXIf_SUPPORTED
446 #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
463 #ifdef PNG_WRITE_FLUSH_SUPPORTED
464 # ifdef PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED
470 #ifdef PNG_CONVERT_tIME_SUPPORTED
474 png_debug(1,
"in png_convert_from_struct_tm");
477 ptime->
month = (png_byte)(ttime->tm_mon + 1);
478 ptime->
day = (png_byte)ttime->tm_mday;
479 ptime->
hour = (png_byte)ttime->tm_hour;
480 ptime->
minute = (png_byte)ttime->tm_min;
481 ptime->
second = (png_byte)ttime->tm_sec;
489 png_debug(1,
"in png_convert_from_time_t");
491 tbuf = gmtime(&ttime);
499 png_error_ptr error_fn, png_error_ptr warn_fn),
PNG_ALLOCATED)
501 #ifndef PNG_USER_MEM_SUPPORTED
505 return png_create_write_struct_2(user_png_ver, error_ptr, error_fn,
512 png_error_ptr error_fn, png_error_ptr warn_fn,
png_voidp mem_ptr,
513 png_malloc_ptr malloc_fn, png_free_ptr free_fn),
PNG_ALLOCATED)
516 error_fn, warn_fn, mem_ptr, malloc_fn, free_fn);
532 png_ptr->zlib_window_bits = 15;
535 #ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
538 png_ptr->zlib_text_mem_level = 8;
539 png_ptr->zlib_text_window_bits = 15;
548 #ifdef PNG_BENIGN_WRITE_ERRORS_SUPPORTED
558 #if PNG_RELEASE_BUILD
612 #ifdef PNG_WRITE_INTERLACING_SUPPORTED
621 for (pass = 0; pass < num_pass; pass++)
631 #ifdef PNG_MNG_FEATURES_SUPPORTED
636 png_debug(1,
"in png_do_write_intrapixel");
656 for (
i = 0, rp =
row;
i < row_width;
i++, rp += bytes_per_pixel)
658 *(rp) = (png_byte)(*rp - *(rp + 1));
659 *(rp + 2) = (png_byte)(*(rp + 2) - *(rp + 1));
663 #ifdef PNG_WRITE_16BIT_SUPPORTED
678 for (
i = 0, rp =
row;
i < row_width;
i++, rp += bytes_per_pixel)
685 *(rp ) = (png_byte)(
red >> 8);
686 *(rp + 1) = (png_byte)
red;
687 *(rp + 4) = (png_byte)(
blue >> 8);
688 *(rp + 5) = (png_byte)
blue;
706 png_debug2(1,
"in png_write_row (row %u, pass %d)",
715 "png_write_info was never called before png_write_row");
718 #if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED)
723 #if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED)
727 #if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \
728 defined(PNG_READ_PACKSWAP_SUPPORTED)
731 "PNG_WRITE_PACKSWAP_SUPPORTED is not defined");
734 #if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED)
739 #if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED)
744 #if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED)
749 #if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED)
757 #ifdef PNG_WRITE_INTERLACING_SUPPORTED
759 if (
png_ptr->interlaced != 0 &&
765 if ((
png_ptr->row_number & 0x07) != 0)
781 if ((
png_ptr->row_number & 0x07) != 4)
797 if ((
png_ptr->row_number & 0x03) != 2)
813 if ((
png_ptr->row_number & 0x01) == 0)
844 #ifdef PNG_WRITE_INTERLACING_SUPPORTED
851 if (row_info.
width == 0)
859 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
861 if (
png_ptr->transformations != 0)
872 #ifdef PNG_MNG_FEATURES_SUPPORTED
886 png_do_write_intrapixel(&row_info,
png_ptr->row_buf + 1);
891 #ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
905 #ifdef PNG_WRITE_FLUSH_SUPPORTED
951 #ifdef PNG_WRITE_FILTER_SUPPORTED
960 #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
981 png_debug(1,
"in png_destroy_write_struct");
983 if (png_ptr_ptr !=
NULL)
1007 #ifdef PNG_MNG_FEATURES_SUPPORTED
1017 #ifdef PNG_WRITE_FILTER_SUPPORTED
1026 #ifdef PNG_WRITE_FILTER_SUPPORTED
1047 #ifdef PNG_WRITE_FILTER_SUPPORTED
1083 "png_set_filter: UP/AVG/PAETH cannot be added after start");
1109 png_malloc(
png_ptr, buf_size));
1111 if (num_filters > 1)
1115 png_malloc(
png_ptr, buf_size));
1125 #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
1127 #ifdef PNG_FLOATING_POINT_SUPPORTED
1131 png_const_doublep filter_costs)
1141 #ifdef PNG_FIXED_POINT_SUPPORTED
1156 #ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
1160 png_debug(1,
"in png_set_compression_level");
1171 png_debug(1,
"in png_set_compression_mem_level");
1176 png_ptr->zlib_mem_level = mem_level;
1182 png_debug(1,
"in png_set_compression_strategy");
1190 png_ptr->zlib_strategy = strategy;
1208 if (window_bits > 15)
1214 else if (window_bits < 8)
1220 png_ptr->zlib_window_bits = window_bits;
1226 png_debug(1,
"in png_set_compression_method");
1242 #ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
1246 png_debug(1,
"in png_set_text_compression_level");
1257 png_debug(1,
"in png_set_text_compression_mem_level");
1262 png_ptr->zlib_text_mem_level = mem_level;
1268 png_debug(1,
"in png_set_text_compression_strategy");
1273 png_ptr->zlib_text_strategy = strategy;
1285 if (window_bits > 15)
1291 else if (window_bits < 8)
1297 png_ptr->zlib_text_window_bits = window_bits;
1303 png_debug(1,
"in png_set_text_compression_method");
1322 png_ptr->write_row_fn = write_row_fn;
1325 #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
1328 write_user_transform_fn)
1330 png_debug(1,
"in png_set_write_user_transform_fn");
1336 png_ptr->write_user_transform_fn = write_user_transform_fn;
1341 #ifdef PNG_INFO_IMAGE_SUPPORTED
1362 #ifdef PNG_WRITE_INVERT_SUPPORTED
1372 #ifdef PNG_WRITE_SHIFT_SUPPORTED
1381 #ifdef PNG_WRITE_PACK_SUPPORTED
1389 #ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
1402 #ifdef PNG_WRITE_FILLER_SUPPORTED
1407 "PNG_TRANSFORM_STRIP_FILLER: BEFORE+AFTER not supported");
1422 #ifdef PNG_WRITE_BGR_SUPPORTED
1430 #ifdef PNG_WRITE_SWAP_SUPPORTED
1438 #ifdef PNG_WRITE_PACKSWAP_SUPPORTED
1446 #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
1465 #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
1480 png_malloc_warn(
png_ptr, (
sizeof *control)));
1482 if (control !=
NULL)
1484 memset(control, 0, (
sizeof *control));
1490 image->opaque = control;
1546 # ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
1554 aindex = (int)channels;
1556 aindex = (int)channels;
1574 while (out_ptr < row_end)
1580 out_ptr[aindex] =
alpha;
1588 reciprocal = ((0xffff<<15)+(
alpha>>1))/
alpha;
1602 if (component >=
alpha)
1608 else if (component > 0 &&
alpha < 65535)
1615 *out_ptr++ = component;
1639 # define UNP_RECIPROCAL(alpha) ((((0xffff*0xff)<<7)+((alpha)>>1))/(alpha))
1661 else if (component > 0)
1670 component *= reciprocal;
1706 # ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
1716 aindex = (int)channels;
1726 while (out_ptr < row_end)
1734 out_ptr[aindex] = alphabyte;
1736 if (alphabyte > 0 && alphabyte < 255)
1741 *out_ptr++ = png_unpremultiply(*in_ptr++,
alpha, reciprocal);
1767 while (out_ptr < row_end)
1787 const void *cmap = display->
colormap;
1788 int entries =
image->colormap_entries > 256 ? 256 :
1789 (int)
image->colormap_entries;
1795 # if defined(PNG_FORMAT_BGR_SUPPORTED) &&\
1796 defined(PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED)
1803 # ifdef PNG_FORMAT_BGR_SUPPORTED
1813 memset(tRNS, 255, (
sizeof tRNS));
1816 for (
i=num_trans=0;
i<entries; ++
i)
1825 entry += (
unsigned int)
i * channels;
1827 if ((channels & 1) != 0)
1854 if (alphabyte > 0 && alphabyte < 255)
1855 reciprocal = (((0xffff*0xff)<<7)+(
alpha>>1))/
alpha;
1857 tRNS[
i] = alphabyte;
1858 if (alphabyte < 255)
1863 palette[
i].blue = png_unpremultiply(
entry[afirst + (2 ^ bgr)],
1873 png_unpremultiply(
entry[afirst],
alpha, reciprocal);
1881 entry += (
unsigned int)
i * channels;
1886 tRNS[
i] =
entry[afirst ? 0 : 3];
1897 tRNS[
i] =
entry[1 ^ afirst];
1945 # ifdef PNG_BENIGN_ERRORS_SUPPORTED
1956 if (
image->width <= 0x7fffffffU/channels)
1970 if (check >= png_row_stride)
1976 if (
image->height > 0xffffffffU/png_row_stride)
1981 png_error(
image->opaque->png_ptr,
"supplied row stride too small");
1996 entries > 16 ? 8 : (entries > 4 ? 4 : (entries > 2 ? 2 : 1)),
2000 png_image_set_PLTE(display);
2005 "no color-map for color-mapped image");
2010 write_16bit ? 16 : 8,
2021 if (write_16bit != 0)
2053 if (write_16bit != 0)
2061 # ifdef PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED
2070 # ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
2082 if (colormap != 0 &&
image->colormap_entries <= 16)
2098 row += (
image->height-1) * (-row_bytes);
2113 # ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
2122 if ((linear != 0 &&
alpha != 0 ) ||
2130 if (write_16bit != 0)
2149 ptrdiff_t row_bytes = display->
row_bytes;
2206 image_memory_write, image_memory_flush);
2208 return png_image_write_main(display);
2227 if (png_image_write_init(
image) != 0)
2232 memset(&display, 0, (
sizeof display));
2266 "png_image_write_to_memory: invalid argument");
2271 "png_image_write_to_memory: incorrect PNG_IMAGE_VERSION");
2277 #ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
2287 if (png_image_write_init(
image) != 0)
2298 memset(&display, 0, (
sizeof display));
2316 "png_image_write_to_stdio: invalid argument");
2321 "png_image_write_to_stdio: incorrect PNG_IMAGE_VERSION");
2330 const void *colormap)
2337 FILE *
fp = fopen(file_name,
"wb");
2342 row_stride, colormap) != 0)
2347 if (fflush(
fp) == 0 && ferror(
fp) == 0)
2349 if (fclose(
fp) == 0)
2383 "png_image_write_to_file: invalid argument");
2388 "png_image_write_to_file: incorrect PNG_IMAGE_VERSION");
small capitals from c petite p scientific i
[1]
int ZEXPORT deflateEnd(z_streamp strm)
int JSAMPARRAY int int num_rows
JSAMPIMAGE JDIMENSION input_row
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld SRC pixld MASK if DST_R else pixld DST_R endif if
int png_image_error(png_imagep image, png_const_charp error_message)
void PNGAPI png_destroy_info_struct(png_const_structrp png_ptr, png_infopp info_ptr_ptr)
int PNGAPI png_handle_as_unknown(png_const_structrp png_ptr, png_const_bytep chunk_name)
void PNGAPI png_image_free(png_imagep image)
#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB
#define PNG_FORMAT_FLAG_COLOR
#define PNG_TRANSFORM_SWAP_ENDIAN
#define PNG_IMAGE_VERSION
#define PNG_TEXT_COMPRESSION_zTXt_WR
#define PNG_TRANSFORM_INVERT_ALPHA
#define PNG_INTRAPIXEL_DIFFERENCING
#define PNG_FILLER_BEFORE
#define PNG_TRANSFORM_PACKING
#define PNG_FORMAT_FLAG_AFIRST
#define PNG_COLOR_TYPE_RGB
#define PNG_MAX_PALETTE_LENGTH
#define PNG_TRANSFORM_SWAP_ALPHA
#define PNG_FORMAT_FLAG_COLORMAP
#define PNG_TRANSFORM_INVERT_MONO
#define PNG_TEXT_COMPRESSION_zTXt
#define PNG_IMAGE_FLAG_FAST
#define PNG_COLOR_TYPE_RGB_ALPHA
#define PNG_FLAG_MNG_FILTER_64
png_structrp int int num_weights
#define PNG_TRANSFORM_PACKSWAP
#define PNG_TEXT_COMPRESSION_NONE
png_structrp int png_fixed_point red
#define PNG_TEXT_COMPRESSION_NONE_WR
#define PNG_FORMAT_FLAG_BGR
#define PNG_FILTER_VALUE_AVG
#define PNG_COLOR_MASK_COLOR
#define PNG_TRANSFORM_STRIP_FILLER_AFTER
#define PNG_FILTER_VALUE_UP
#define PNG_TRANSFORM_BGR
#define PNG_TRANSFORM_STRIP_FILLER_BEFORE
#define PNG_FILTER_TYPE_BASE
#define PNG_HANDLE_CHUNK_NEVER
#define PNG_COLOR_MASK_ALPHA
#define PNG_HANDLE_CHUNK_ALWAYS
#define PNG_FORMAT_FLAG_LINEAR
#define PNG_sRGB_INTENT_PERCEPTUAL
png_structrp int heuristic_method
const png_info *PNG_RESTRICT png_const_inforp
#define PNG_COLOR_TYPE_PALETTE
#define PNG_FILTER_VALUE_PAETH
#define PNG_LIBPNG_VER_STRING
#define PNG_FORMAT_FLAG_ALPHA
#define PNG_FILTER_VALUE_NONE
png_structrp int int png_const_fixed_point_p filter_weights
png_const_structrp png_const_inforp png_fixed_point *int_file_gamma png_set_gAMA_fixed
#define PNG_INTERLACE_NONE
#define PNG_IMAGE_SAMPLE_CHANNELS(fmt)
png_info *PNG_RESTRICT png_inforp
#define PNG_COMPRESSION_TYPE_BASE
#define PNG_FILTER_VALUE_SUB
#define PNG_IMAGE_PIXEL_CHANNELS(fmt)
#define PNG_HANDLE_CHUNK_AS_DEFAULT
png_struct *PNG_RESTRICT png_structrp
#define PNG_TRANSFORM_SHIFT
png_const_structrp png_const_inforp info_ptr
const png_byte * png_const_bytep
const png_uint_16 * png_const_uint_16p
png_uint_16 * png_uint_16p
const void * png_const_voidp
const png_fixed_point * png_const_fixed_point_p
const char * png_const_charp
#define png_debug2(l, m, p1, p2)
#define png_debug1(l, m, p1)
void PNGAPI png_benign_error(png_const_structrp png_ptr, png_const_charp error_message)
void png_app_warning(png_const_structrp png_ptr, png_const_charp error_message)
void PNGAPI png_warning(png_const_structrp png_ptr, png_const_charp warning_message)
void PNGCBAPI png_safe_warning(png_structp png_nonconst_ptr, png_const_charp warning_message)
int png_safe_execute(png_imagep image_in, int(*function)(png_voidp), png_voidp arg)
void png_app_error(png_const_structrp png_ptr, png_const_charp error_message)
size_t PNGAPI png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr)
#define PNG_Z_DEFAULT_STRATEGY
#define PNG_TEXT_Z_DEFAULT_COMPRESSION
#define PNG_WRITE_INTERLACING_SUPPORTED
#define PNG_Z_DEFAULT_COMPRESSION
#define PNG_TEXT_Z_DEFAULT_STRATEGY
void PNGAPI png_free(png_const_structrp png_ptr, png_voidp ptr)
void png_destroy_png_struct(png_structrp png_ptr)
#define PNG_UNUSED(param)
#define PNG_HAVE_PNG_SIGNATURE
#define PNG_ROWBYTES(pixel_bits, width)
#define PNG_FLAG_BENIGN_ERRORS_WARN
#define PNG_USER_TRANSFORM
#define PNG_WROTE_INFO_BEFORE_PLTE
#define PNG_FLAG_APP_WARNINGS_WARN
#define PNG_FLAG_ZSTREAM_INITIALIZED
#define PNG_GAMMA_sRGB_INVERSE
#define PNG_sRGB_FROM_LINEAR(linear)
#define png_voidcast(type, value)
#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY
png_int_32(PNGAPI png_get_int_32)(png_const_bytep buf)
png_uint_16(PNGAPI png_get_uint_16)(png_const_bytep buf)
void PNGAPI png_set_benign_errors(png_structrp png_ptr, int allowed)
void PNGAPI png_set_IHDR(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_type, int compression_type, int filter_type)
void PNGAPI png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_const_colorp palette, int num_palette)
void PNGFAPI png_set_cHRM_fixed(png_const_structrp png_ptr, png_inforp info_ptr, png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x, png_fixed_point blue_y)
void PNGAPI png_set_sRGB(png_const_structrp png_ptr, png_inforp info_ptr, int srgb_intent)
void PNGAPI png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans, png_const_color_16p trans_color)
void PNGAPI png_set_filler(png_structrp png_ptr, png_uint_32 filler, int filler_loc)
void png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info)
void PNGAPI png_set_bgr(png_structrp png_ptr)
void PNGAPI png_set_swap(png_structrp png_ptr)
void PNGAPI png_set_packswap(png_structrp png_ptr)
void PNGAPI png_set_invert_mono(png_structrp png_ptr)
void PNGAPI png_set_packing(png_structrp png_ptr)
void PNGAPI png_set_shift(png_structrp png_ptr, png_const_color_8p true_bits)
void PNGAPI png_set_invert_alpha(png_structrp png_ptr)
int PNGAPI png_set_interlace_handling(png_structrp png_ptr)
void PNGAPI png_set_swap_alpha(png_structrp png_ptr)
void PNGAPI png_set_write_fn(png_structrp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
void png_flush(png_structrp png_ptr)
void PNGAPI png_set_filter_heuristics_fixed(png_structrp png_ptr, int heuristic_method, int num_weights, png_const_fixed_point_p filter_weights, png_const_fixed_point_p filter_costs)
void PNGAPI png_convert_from_struct_tm(png_timep ptime, const struct tm *ttime)
int PNGAPI png_image_write_to_file(png_imagep image, const char *file_name, int convert_to_8bit, const void *buffer, png_int_32 row_stride, const void *colormap)
void PNGAPI png_write_png(png_structrp png_ptr, png_inforp info_ptr, int transforms, voidp params)
static png_bytep size_t size
void PNGAPI png_set_compression_method(png_structrp png_ptr, int method)
else png_error(png_ptr, "png_image_write_to_memory: PNG too big")
void PNGAPI png_set_write_status_fn(png_structrp png_ptr, png_write_status_ptr write_row_fn)
void PNGAPI png_write_info(png_structrp png_ptr, png_const_inforp info_ptr)
void PNGAPI png_write_info_before_PLTE(png_structrp png_ptr, png_const_inforp info_ptr)
void PNGAPI png_set_flush(png_structrp png_ptr, int nrows)
void PNGAPI png_set_write_user_transform_fn(png_structrp png_ptr, png_user_transform_ptr write_user_transform_fn)
void PNGAPI png_set_compression_strategy(png_structrp png_ptr, int strategy)
void PNGAPI png_set_text_compression_mem_level(png_structrp png_ptr, int mem_level)
if(size<=((png_alloc_size_t) -1) - ob)
#define UNP_RECIPROCAL(alpha)
void PNGAPI png_set_filter(png_structrp png_ptr, int method, int filters)
void PNGAPI png_set_filter_heuristics(png_structrp png_ptr, int heuristic_method, int num_weights, png_const_doublep filter_weights, png_const_doublep filter_costs)
PNG_FUNCTION(png_structp, PNGAPI png_create_write_struct,(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn), PNG_ALLOCATED)
void PNGAPI png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
void PNGAPI png_set_compression_window_bits(png_structrp png_ptr, int window_bits)
void PNGAPI png_write_row(png_structrp png_ptr, png_const_bytep row)
void PNGAPI png_convert_from_time_t(png_timep ptime, time_t ttime)
void PNGAPI png_write_end(png_structrp png_ptr, png_inforp info_ptr)
void PNGAPI png_set_text_compression_strategy(png_structrp png_ptr, int strategy)
void PNGAPI png_write_flush(png_structrp png_ptr)
void PNGAPI png_write_rows(png_structrp png_ptr, png_bytepp row, png_uint_32 num_rows)
int PNGAPI png_image_write_to_stdio(png_imagep image, FILE *file, int convert_to_8bit, const void *buffer, png_int_32 row_stride, const void *colormap)
void PNGAPI png_set_compression_mem_level(png_structrp png_ptr, int mem_level)
void PNGAPI png_set_text_compression_method(png_structrp png_ptr, int method)
void PNGAPI png_write_image(png_structrp png_ptr, png_bytepp image)
void PNGAPI png_set_compression_level(png_structrp png_ptr, int level)
void PNGAPI png_set_text_compression_window_bits(png_structrp png_ptr, int window_bits)
int PNGAPI png_image_write_to_memory(png_imagep image, void *memory, png_alloc_size_t *PNG_RESTRICT memory_bytes, int convert_to_8bit, const void *buffer, png_int_32 row_stride, const void *colormap)
void PNGAPI png_set_text_compression_level(png_structrp png_ptr, int level)
void png_do_write_transformations(png_structrp png_ptr, png_row_infop row_info)
void png_write_finish_row(png_structrp png_ptr)
void png_write_sRGB(png_structrp png_ptr, int srgb_intent)
void png_free_buffer_list(png_structrp png_ptr, png_compression_bufferp *listp)
void png_write_sCAL_s(png_structrp png_ptr, int unit, png_const_charp width, png_const_charp height)
void png_write_iCCP(png_structrp png_ptr, png_const_charp name, png_const_bytep profile)
void png_write_hIST(png_structrp png_ptr, png_const_uint_16p hist, int num_hist)
void PNGAPI png_write_sig(png_structrp png_ptr)
void png_write_IEND(png_structrp png_ptr)
void png_write_oFFs(png_structrp png_ptr, png_int_32 x_offset, png_int_32 y_offset, int unit_type)
void png_write_gAMA_fixed(png_structrp png_ptr, png_fixed_point file_gamma)
void png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type)
void png_write_PLTE(png_structrp png_ptr, png_const_colorp palette, png_uint_32 num_pal)
void png_write_bKGD(png_structrp png_ptr, png_const_color_16p back, int color_type)
void PNGAPI png_write_chunk(png_structrp png_ptr, png_const_bytep chunk_string, png_const_bytep data, size_t length)
void png_write_sPLT(png_structrp png_ptr, png_const_sPLT_tp spalette)
void png_write_zTXt(png_structrp png_ptr, png_const_charp key, png_const_charp text, int compression)
void png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
void png_compress_IDAT(png_structrp png_ptr, png_const_bytep input, png_alloc_size_t input_len, int flush)
void png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
void png_write_tIME(png_structrp png_ptr, png_const_timep mod_time)
void png_write_IHDR(png_structrp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int compression_type, int filter_type, int interlace_type)
void png_write_eXIf(png_structrp png_ptr, png_bytep exif, int num_exif)
void png_write_tRNS(png_structrp png_ptr, png_const_bytep trans_alpha, png_const_color_16p tran, int num_trans, int color_type)
void png_write_cHRM_fixed(png_structrp png_ptr, const png_xy *xy)
void png_write_pCAL(png_structrp png_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_const_charp units, png_charpp params)
void png_write_start_row(png_structrp png_ptr)
void png_write_pHYs(png_structrp png_ptr, png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, int unit_type)
void png_write_iTXt(png_structrp png_ptr, int compression, png_const_charp key, png_const_charp lang, png_const_charp lang_key, png_const_charp text)
void png_write_tEXt(png_structrp png_ptr, png_const_charp key, png_const_charp text, size_t text_len)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
GLenum GLuint GLint level
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
GLsizei GLenum GLsizei GLsizei GLuint memory
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s0
GLenum GLenum GLsizei void * row
GLfloat GLfloat GLfloat alpha
settings remove("monkey")
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
png_alloc_size_t output_bytes
png_alloc_size_t memory_bytes
png_const_voidp first_row