| 1 | |
| 2 | /* pngpread.c - read a png file in push mode |
| 3 | * |
| 4 | * Copyright (c) 2018-2024 Cosmin Truta |
| 5 | * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson |
| 6 | * Copyright (c) 1996-1997 Andreas Dilger |
| 7 | * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. |
| 8 | * |
| 9 | * This code is released under the libpng license. |
| 10 | * For conditions of distribution and use, see the disclaimer |
| 11 | * and license in png.h |
| 12 | */ |
| 13 | |
| 14 | #include "pngpriv.h"cxx . . $ `<file>/Modules/ThirdParty/PNG/src/itkpng/pngpriv.h`/ |
| 15 | |
| 16 | #ifdef PNG_PROGRESSIVE_READ_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:53:9`! |
| 17 | |
| 18 | /* Push model modes */ |
| 19 | #define PNG_READ_SIG_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:19:9`! 0 |
| 20 | #define PNG_READ_CHUNK_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:20:9`! 1 |
| 21 | #define PNG_READ_IDAT_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:21:9`! 2 |
| 22 | #define PNG_READ_tEXt_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:22:9`! 4 |
| 23 | #define PNG_READ_zTXt_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:23:9`! 5 |
| 24 | #define PNG_READ_DONE_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:24:9`! 6 |
| 25 | #define PNG_READ_iTXt_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:25:9`! 7 |
| 26 | #define PNG_ERROR_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:26:9`! 8 |
| 27 | |
| 28 | #define PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! \ |
| 29 | if (png_ptr->push_length + 4 > png_ptr->buffer_size) \ |
| 30 | { png_push_save_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:240:9`!(png_ptr); return; } |
| 31 | #define PNG_PUSH_SAVE_BUFFER_IF_LTcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:31:9`!(N) \ |
| 32 | if (png_ptr->buffer_size < N) \ |
| 33 | { png_push_save_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:240:9`!(png_ptr); return; } |
| 34 | |
| 35 | void PNGAPIcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngconf.h:262:11`! |
| 36 | png_process_datacxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:226:9`!(png_structrpcxx . . $ png_structrp# png_ptr, png_inforpcxx . . $ png_inforp# info_ptr, |
| 37 | png_bytepcxx . . $ png_bytep# buffer, size_t buffer_size) |
| 38 | { |
| 39 | if (png_ptr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || info_ptr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 40 | return; |
| 41 | |
| 42 | png_push_restore_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:239:9`!(png_ptr, buffer, buffer_size); |
| 43 | |
| 44 | while (png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size.) |
| 45 | { |
| 46 | png_process_some_datacxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:229:9`!(png_ptr, info_ptr); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | size_t PNGAPIcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngconf.h:262:11`! |
| 51 | png_process_data_pausecxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:227:9`!(png_structrpcxx . . $ png_structrp# png_ptr, int save) |
| 52 | { |
| 53 | if (png_ptr != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 54 | { |
| 55 | /* It's easiest for the caller if we do the save; then the caller doesn't |
| 56 | * have to supply the same data again: |
| 57 | */ |
| 58 | if (save != 0) |
| 59 | png_push_save_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:240:9`!(png_ptr); |
| 60 | else |
| 61 | { |
| 62 | /* This includes any pending saved bytes: */ |
| 63 | size_t remaining = png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size.; |
| 64 | png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size. = 0; |
| 65 | |
| 66 | /* So subtract the saved buffer size, unless all the data |
| 67 | * is actually 'saved', in which case we just return 0 |
| 68 | */ |
| 69 | if (png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size. < remaining) |
| 70 | return remaining - png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size.; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | return 0; |
| 75 | } |
| 76 | |
| 77 | png_uint_32cxx . . $ png_uint_32# PNGAPIcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngconf.h:262:11`! |
| 78 | png_process_data_skipcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:228:9`!(png_structrpcxx . . $ png_structrp# png_ptr) |
| 79 | { |
| 80 | /* TODO: Deprecate and remove this API. |
| 81 | * Somewhere the implementation of this seems to have been lost, |
| 82 | * or abandoned. It was only to support some internal back-door access |
| 83 | * to png_struct) in libpng-1.4.x. |
| 84 | */ |
| 85 | png_app_warningcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:21:9`!(png_ptr, |
| 86 | "png_process_data_skip is not implemented in any current version of libpng"); |
| 87 | return 0; |
| 88 | } |
| 89 | |
| 90 | /* What we do with the incoming data depends on what we were previously |
| 91 | * doing before we ran out of data... |
| 92 | */ |
| 93 | void /* PRIVATE */ |
| 94 | png_process_some_datacxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:229:9`!(png_structrpcxx . . $ png_structrp# png_ptr, png_inforpcxx . . $ png_inforp# info_ptr) |
| 95 | { |
| 96 | if (png_ptr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 97 | return; |
| 98 | |
| 99 | switch (png_ptr->process_modecxx . . $ png_struct_def#process_mode.) |
| 100 | { |
| 101 | case PNG_READ_SIG_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:19:9`!: |
| 102 | { |
| 103 | png_push_read_sigcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:238:9`!(png_ptr, info_ptr); |
| 104 | break; |
| 105 | } |
| 106 | |
| 107 | case PNG_READ_CHUNK_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:20:9`!: |
| 108 | { |
| 109 | png_push_read_chunkcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:237:9`!(png_ptr, info_ptr); |
| 110 | break; |
| 111 | } |
| 112 | |
| 113 | case PNG_READ_IDAT_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:21:9`!: |
| 114 | { |
| 115 | png_push_read_IDATcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:236:9`!(png_ptr); |
| 116 | break; |
| 117 | } |
| 118 | |
| 119 | default: |
| 120 | { |
| 121 | png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size. = 0; |
| 122 | break; |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /* Read any remaining signature bytes from the stream and compare them with |
| 128 | * the correct PNG signature. It is possible that this routine is called |
| 129 | * with bytes already read from the signature, either because they have been |
| 130 | * checked by the calling application, or because of multiple calls to this |
| 131 | * routine. |
| 132 | */ |
| 133 | void /* PRIVATE */ |
| 134 | png_push_read_sigcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:238:9`!(png_structrpcxx . . $ png_structrp# png_ptr, png_inforpcxx . . $ png_inforp# info_ptr) |
| 135 | { |
| 136 | size_t num_checked = png_ptr->sig_bytescxx . . $ png_struct_def#sig_bytes.; /* SAFE, does not exceed 8 */ |
| 137 | size_t num_to_check = 8 - num_checked; |
| 138 | |
| 139 | if (png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size. < num_to_check) |
| 140 | { |
| 141 | num_to_check = png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size.; |
| 142 | } |
| 143 | |
| 144 | png_push_fill_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:231:9`!(png_ptr, &(info_ptr->signaturecxx . . $ png_info_def#signature.[num_checked]), |
| 145 | num_to_check); |
| 146 | png_ptr->sig_bytescxx . . $ png_struct_def#sig_bytes. = (png_bytecxx . . $ png_byte#)(png_ptr->sig_bytescxx . . $ png_struct_def#sig_bytes. + num_to_check); |
| 147 | |
| 148 | if (png_sig_cmpcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:370:9`!(info_ptr->signaturecxx . . $ png_info_def#signature., num_checked, num_to_check) != 0) |
| 149 | { |
| 150 | if (num_checked < 4 && |
| 151 | png_sig_cmpcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:370:9`!(info_ptr->signaturecxx . . $ png_info_def#signature., num_checked, num_to_check - 4) != 0) |
| 152 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "Not a PNG file"); |
| 153 | |
| 154 | else |
| 155 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "PNG file corrupted by ASCII conversion"); |
| 156 | } |
| 157 | else |
| 158 | { |
| 159 | if (png_ptr->sig_bytescxx . . $ png_struct_def#sig_bytes. >= 8) |
| 160 | { |
| 161 | png_ptr->process_modecxx . . $ png_struct_def#process_mode. = PNG_READ_CHUNK_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:20:9`!; |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | void /* PRIVATE */ |
| 167 | png_push_read_chunkcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:237:9`!(png_structrpcxx . . $ png_structrp# png_ptr, png_inforpcxx . . $ png_inforp# info_ptr) |
| 168 | { |
| 169 | png_uint_32cxx . . $ png_uint_32# chunk_name; |
| 170 | #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:41:9`! |
| 171 | int keep; /* unknown handling method */ |
| 172 | #endif |
| 173 | |
| 174 | /* First we make sure we have enough data for the 4-byte chunk name |
| 175 | * and the 4-byte chunk length before proceeding with decoding the |
| 176 | * chunk data. To fully decode each of these chunks, we also make |
| 177 | * sure we have enough data in the buffer for the 4-byte CRC at the |
| 178 | * end of every chunk (except IDAT, which is handled separately). |
| 179 | */ |
| 180 | if ((png_ptr->modecxx . . $ png_struct_def#mode. & PNG_HAVE_CHUNK_HEADERcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:657:9`!) == 0) |
| 181 | { |
| 182 | png_bytecxx . . $ png_byte# chunk_length[4]; |
| 183 | png_bytecxx . . $ png_byte# chunk_tag[4]; |
| 184 | |
| 185 | PNG_PUSH_SAVE_BUFFER_IF_LTcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:31:9`!(8) |
| 186 | png_push_fill_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:231:9`!(png_ptr, chunk_length, 4); |
| 187 | png_ptr->push_lengthcxx . . $ png_struct_def#push_length. = png_get_uint_31cxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:157:9`!(png_ptr, chunk_length); |
| 188 | png_reset_crccxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:261:9`!(png_ptr); |
| 189 | png_crc_readcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:56:9`!(png_ptr, chunk_tag, 4); |
| 190 | png_ptr->chunk_namecxx . . $ png_struct_def#chunk_name. = PNG_CHUNK_FROM_STRINGcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:904:9`!(chunk_tag); |
| 191 | png_check_chunk_namecxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:31:9`!(png_ptr, png_ptr->chunk_namecxx . . $ png_struct_def#chunk_name.); |
| 192 | png_check_chunk_lengthcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:30:9`!(png_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 193 | png_ptr->modecxx . . $ png_struct_def#mode. |= PNG_HAVE_CHUNK_HEADERcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:657:9`!; |
| 194 | } |
| 195 | |
| 196 | chunk_name = png_ptr->chunk_namecxx . . $ png_struct_def#chunk_name.; |
| 197 | |
| 198 | if (chunk_name == png_IDATcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:873:9`!) |
| 199 | { |
| 200 | if ((png_ptr->modecxx . . $ png_struct_def#mode. & PNG_AFTER_IDATcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:645:9`!) != 0) |
| 201 | png_ptr->modecxx . . $ png_struct_def#mode. |= PNG_HAVE_CHUNK_AFTER_IDATcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:662:9`!; |
| 202 | |
| 203 | /* If we reach an IDAT chunk, this means we have read all of the |
| 204 | * header chunks, and we can start reading the image (or if this |
| 205 | * is called after the image has been read - we have an error). |
| 206 | */ |
| 207 | if ((png_ptr->modecxx . . $ png_struct_def#mode. & PNG_HAVE_IHDRcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:643:9`!) == 0) |
| 208 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "Missing IHDR before IDAT"); |
| 209 | |
| 210 | else if (png_ptr->color_typecxx . . $ png_struct_def#color_type. == PNG_COLOR_TYPE_PALETTEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:668:9`! && |
| 211 | (png_ptr->modecxx . . $ png_struct_def#mode. & PNG_HAVE_PLTEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:644:9`!) == 0) |
| 212 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "Missing PLTE before IDAT"); |
| 213 | |
| 214 | png_ptr->process_modecxx . . $ png_struct_def#process_mode. = PNG_READ_IDAT_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:21:9`!; |
| 215 | |
| 216 | if ((png_ptr->modecxx . . $ png_struct_def#mode. & PNG_HAVE_IDATcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:651:9`!) != 0) |
| 217 | if ((png_ptr->modecxx . . $ png_struct_def#mode. & PNG_HAVE_CHUNK_AFTER_IDATcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:662:9`!) == 0) |
| 218 | if (png_ptr->push_lengthcxx . . $ png_struct_def#push_length. == 0) |
| 219 | return; |
| 220 | |
| 221 | png_ptr->modecxx . . $ png_struct_def#mode. |= PNG_HAVE_IDATcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:651:9`!; |
| 222 | |
| 223 | if ((png_ptr->modecxx . . $ png_struct_def#mode. & PNG_AFTER_IDATcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:645:9`!) != 0) |
| 224 | png_benign_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:24:9`!(png_ptr, "Too many IDATs found"); |
| 225 | } |
| 226 | |
| 227 | if (chunk_name == png_IHDRcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:875:9`!) |
| 228 | { |
| 229 | if (png_ptr->push_lengthcxx . . $ png_struct_def#push_length. != 13) |
| 230 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "Invalid IHDR length"); |
| 231 | |
| 232 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 233 | png_handle_IHDRcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:177:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 234 | } |
| 235 | |
| 236 | else if (chunk_name == png_IENDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:874:9`!) |
| 237 | { |
| 238 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 239 | png_handle_IENDcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:176:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 240 | |
| 241 | png_ptr->process_modecxx . . $ png_struct_def#process_mode. = PNG_READ_DONE_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:24:9`!; |
| 242 | png_push_have_endcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:232:9`!(png_ptr, info_ptr); |
| 243 | } |
| 244 | |
| 245 | #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:41:9`! |
| 246 | else if ((keep = png_chunk_unknown_handlingcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:38:9`!(png_ptr, chunk_name)) != 0) |
| 247 | { |
| 248 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 249 | png_handle_unknowncxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:197:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length., keep); |
| 250 | |
| 251 | if (chunk_name == png_PLTEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:876:9`!) |
| 252 | png_ptr->modecxx . . $ png_struct_def#mode. |= PNG_HAVE_PLTEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:644:9`!; |
| 253 | } |
| 254 | #endif |
| 255 | |
| 256 | else if (chunk_name == png_PLTEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:876:9`!) |
| 257 | { |
| 258 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 259 | png_handle_PLTEcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:178:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 260 | } |
| 261 | |
| 262 | else if (chunk_name == png_IDATcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:873:9`!) |
| 263 | { |
| 264 | png_ptr->idat_sizecxx . . $ png_struct_def#idat_size. = png_ptr->push_lengthcxx . . $ png_struct_def#push_length.; |
| 265 | png_ptr->process_modecxx . . $ png_struct_def#process_mode. = PNG_READ_IDAT_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:21:9`!; |
| 266 | png_push_have_infocxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:233:9`!(png_ptr, info_ptr); |
| 267 | png_ptr->zstreamcxx . . $ png_struct_def#zstream..avail_outcxx . . $ z_stream_s#avail_out. = |
| 268 | (uIntcxx . . $ `build/Modules/ThirdParty/ZLIB/src/itkzlib-ng/zlib_name_mangling.h:149:9`!) PNG_ROWBYTEScxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:763:9`!(png_ptr->pixel_depth, |
| 269 | png_ptr->iwidth) + 1; |
| 270 | png_ptr->zstreamcxx . . $ png_struct_def#zstream..next_outcxx . . $ z_stream_s#next_out. = png_ptr->row_bufcxx . . $ png_struct_def#row_buf.; |
| 271 | return; |
| 272 | } |
| 273 | |
| 274 | #ifdef PNG_READ_gAMA_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:92:9`! |
| 275 | else if (png_ptr->chunk_namecxx . . $ png_struct_def#chunk_name. == png_gAMAcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:881:9`!) |
| 276 | { |
| 277 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 278 | png_handle_gAMAcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:183:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 279 | } |
| 280 | |
| 281 | #endif |
| 282 | #ifdef PNG_READ_sBIT_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:99:9`! |
| 283 | else if (png_ptr->chunk_namecxx . . $ png_struct_def#chunk_name. == png_sBITcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:891:9`!) |
| 284 | { |
| 285 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 286 | png_handle_sBITcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:190:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 287 | } |
| 288 | |
| 289 | #endif |
| 290 | #ifdef PNG_READ_cHRM_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:90:9`! |
| 291 | else if (png_ptr->chunk_namecxx . . $ png_struct_def#chunk_name. == png_cHRMcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:878:9`!) |
| 292 | { |
| 293 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 294 | png_handle_cHRMcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:181:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 295 | } |
| 296 | |
| 297 | #endif |
| 298 | #ifdef PNG_READ_eXIf_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:91:9`! |
| 299 | else if (png_ptr->chunk_namecxx . . $ png_struct_def#chunk_name. == png_eXIfcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:879:9`!) |
| 300 | { |
| 301 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 302 | png_handle_eXIfcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:182:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 303 | } |
| 304 | |
| 305 | #endif |
| 306 | #ifdef PNG_READ_sRGB_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:102:9`! |
| 307 | else if (chunk_name == png_sRGBcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:894:9`!) |
| 308 | { |
| 309 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 310 | png_handle_sRGBcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:193:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 311 | } |
| 312 | |
| 313 | #endif |
| 314 | #ifdef PNG_READ_iCCP_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:94:9`! |
| 315 | else if (png_ptr->chunk_namecxx . . $ png_struct_def#chunk_name. == png_iCCPcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:886:9`!) |
| 316 | { |
| 317 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 318 | png_handle_iCCPcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:185:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 319 | } |
| 320 | |
| 321 | #endif |
| 322 | #ifdef PNG_READ_sPLT_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:101:9`! |
| 323 | else if (chunk_name == png_sPLTcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:893:9`!) |
| 324 | { |
| 325 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 326 | png_handle_sPLTcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:192:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 327 | } |
| 328 | |
| 329 | #endif |
| 330 | #ifdef PNG_READ_tRNS_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:105:9`! |
| 331 | else if (chunk_name == png_tRNScxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:898:9`!) |
| 332 | { |
| 333 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 334 | png_handle_tRNScxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:196:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 335 | } |
| 336 | |
| 337 | #endif |
| 338 | #ifdef PNG_READ_bKGD_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:89:9`! |
| 339 | else if (chunk_name == png_bKGDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:877:9`!) |
| 340 | { |
| 341 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 342 | png_handle_bKGDcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:180:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 343 | } |
| 344 | |
| 345 | #endif |
| 346 | #ifdef PNG_READ_hIST_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:93:9`! |
| 347 | else if (chunk_name == png_hISTcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:885:9`!) |
| 348 | { |
| 349 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 350 | png_handle_hISTcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:184:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 351 | } |
| 352 | |
| 353 | #endif |
| 354 | #ifdef PNG_READ_pHYs_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:98:9`! |
| 355 | else if (chunk_name == png_pHYscxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:890:9`!) |
| 356 | { |
| 357 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 358 | png_handle_pHYscxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:189:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 359 | } |
| 360 | |
| 361 | #endif |
| 362 | #ifdef PNG_READ_oFFs_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:96:9`! |
| 363 | else if (chunk_name == png_oFFscxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:888:9`!) |
| 364 | { |
| 365 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 366 | png_handle_oFFscxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:187:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 367 | } |
| 368 | #endif |
| 369 | |
| 370 | #ifdef PNG_READ_pCAL_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:97:9`! |
| 371 | else if (chunk_name == png_pCALcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:889:9`!) |
| 372 | { |
| 373 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 374 | png_handle_pCALcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:188:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 375 | } |
| 376 | |
| 377 | #endif |
| 378 | #ifdef PNG_READ_sCAL_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:100:9`! |
| 379 | else if (chunk_name == png_sCALcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:892:9`!) |
| 380 | { |
| 381 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 382 | png_handle_sCALcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:191:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 383 | } |
| 384 | |
| 385 | #endif |
| 386 | #ifdef PNG_READ_tIME_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:104:9`! |
| 387 | else if (chunk_name == png_tIMEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:897:9`!) |
| 388 | { |
| 389 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 390 | png_handle_tIMEcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:195:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 391 | } |
| 392 | |
| 393 | #endif |
| 394 | #ifdef PNG_READ_tEXt_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:103:9`! |
| 395 | else if (chunk_name == png_tEXtcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:896:9`!) |
| 396 | { |
| 397 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 398 | png_handle_tEXtcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:194:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 399 | } |
| 400 | |
| 401 | #endif |
| 402 | #ifdef PNG_READ_zTXt_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:106:9`! |
| 403 | else if (chunk_name == png_zTXtcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:899:9`!) |
| 404 | { |
| 405 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 406 | png_handle_zTXtcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:198:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 407 | } |
| 408 | |
| 409 | #endif |
| 410 | #ifdef PNG_READ_iTXt_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:95:9`! |
| 411 | else if (chunk_name == png_iTXtcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:887:9`!) |
| 412 | { |
| 413 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 414 | png_handle_iTXtcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:186:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length.); |
| 415 | } |
| 416 | #endif |
| 417 | |
| 418 | else |
| 419 | { |
| 420 | PNG_PUSH_SAVE_BUFFER_IF_FULLcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:28:9`! |
| 421 | png_handle_unknowncxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:197:9`!(png_ptr, info_ptr, png_ptr->push_lengthcxx . . $ png_struct_def#push_length., |
| 422 | PNG_HANDLE_CHUNK_AS_DEFAULTcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:2341:9`!); |
| 423 | } |
| 424 | |
| 425 | png_ptr->modecxx . . $ png_struct_def#mode. &= ~PNG_HAVE_CHUNK_HEADERcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:657:9`!; |
| 426 | } |
| 427 | |
| 428 | void PNGCBAPIcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngconf.h:259:11`! |
| 429 | png_push_fill_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:231:9`!(png_structpcxx . . $ png_structp# png_ptr, png_bytepcxx . . $ png_bytep# buffer, size_t length) |
| 430 | { |
| 431 | png_bytepcxx . . $ png_bytep# ptr; |
| 432 | |
| 433 | if (png_ptr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 434 | return; |
| 435 | |
| 436 | ptr = buffer; |
| 437 | if (png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size. != 0) |
| 438 | { |
| 439 | size_t save_size; |
| 440 | |
| 441 | if (length < png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size.) |
| 442 | save_size = length; |
| 443 | |
| 444 | else |
| 445 | save_size = png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size.; |
| 446 | |
| 447 | memcpycxx . . $ memcpy(cc817cb175f282d).(ptr, png_ptr->save_buffer_ptrcxx . . $ png_struct_def#save_buffer_ptr., save_size); |
| 448 | length -= save_size; |
| 449 | ptr += save_size; |
| 450 | png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size. -= save_size; |
| 451 | png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size. -= save_size; |
| 452 | png_ptr->save_buffer_ptrcxx . . $ png_struct_def#save_buffer_ptr. += save_size; |
| 453 | } |
| 454 | if (length != 0 && png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size. != 0) |
| 455 | { |
| 456 | size_t save_size; |
| 457 | |
| 458 | if (length < png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size.) |
| 459 | save_size = length; |
| 460 | |
| 461 | else |
| 462 | save_size = png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size.; |
| 463 | |
| 464 | memcpycxx . . $ memcpy(cc817cb175f282d).(ptr, png_ptr->current_buffer_ptrcxx . . $ png_struct_def#current_buffer_ptr., save_size); |
| 465 | png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size. -= save_size; |
| 466 | png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size. -= save_size; |
| 467 | png_ptr->current_buffer_ptrcxx . . $ png_struct_def#current_buffer_ptr. += save_size; |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | void /* PRIVATE */ |
| 472 | png_push_save_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:240:9`!(png_structrpcxx . . $ png_structrp# png_ptr) |
| 473 | { |
| 474 | if (png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size. != 0) |
| 475 | { |
| 476 | if (png_ptr->save_buffer_ptrcxx . . $ png_struct_def#save_buffer_ptr. != png_ptr->save_buffercxx . . $ png_struct_def#save_buffer.) |
| 477 | { |
| 478 | size_t i, istop; |
| 479 | png_bytepcxx . . $ png_bytep# sp; |
| 480 | png_bytepcxx . . $ png_bytep# dp; |
| 481 | |
| 482 | istop = png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size.; |
| 483 | for (i = 0, sp = png_ptr->save_buffer_ptrcxx . . $ png_struct_def#save_buffer_ptr., dp = png_ptr->save_buffercxx . . $ png_struct_def#save_buffer.; |
| 484 | i < istop; i++, sp++, dp++) |
| 485 | { |
| 486 | *dp = *sp; |
| 487 | } |
| 488 | } |
| 489 | } |
| 490 | if (png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size. + png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size. > |
| 491 | png_ptr->save_buffer_maxcxx . . $ png_struct_def#save_buffer_max.) |
| 492 | { |
| 493 | size_t new_max; |
| 494 | png_bytepcxx . . $ png_bytep# old_buffer; |
| 495 | |
| 496 | if (png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size. > PNG_SIZE_MAXcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:650:9`! - |
| 497 | (png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size. + 256)) |
| 498 | { |
| 499 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "Potential overflow of save_buffer"); |
| 500 | } |
| 501 | |
| 502 | new_max = png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size. + png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size. + 256; |
| 503 | old_buffer = png_ptr->save_buffercxx . . $ png_struct_def#save_buffer.; |
| 504 | png_ptr->save_buffercxx . . $ png_struct_def#save_buffer. = (png_bytepcxx . . $ png_bytep#)png_malloc_warncxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:221:9`!(png_ptr, |
| 505 | (size_t)new_max); |
| 506 | |
| 507 | if (png_ptr->save_buffercxx . . $ png_struct_def#save_buffer. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 508 | { |
| 509 | png_freecxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:90:9`!(png_ptr, old_buffer); |
| 510 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "Insufficient memory for save_buffer"); |
| 511 | } |
| 512 | |
| 513 | if (old_buffer) |
| 514 | memcpycxx . . $ memcpy(cc817cb175f282d).(png_ptr->save_buffercxx . . $ png_struct_def#save_buffer., old_buffer, png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size.); |
| 515 | else if (png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size.) |
| 516 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "save_buffer error"); |
| 517 | png_freecxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:90:9`!(png_ptr, old_buffer); |
| 518 | png_ptr->save_buffer_maxcxx . . $ png_struct_def#save_buffer_max. = new_max; |
| 519 | } |
| 520 | if (png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size.) |
| 521 | { |
| 522 | memcpycxx . . $ memcpy(cc817cb175f282d).(png_ptr->save_buffercxx . . $ png_struct_def#save_buffer. + png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size., |
| 523 | png_ptr->current_buffer_ptrcxx . . $ png_struct_def#current_buffer_ptr., png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size.); |
| 524 | png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size. += png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size.; |
| 525 | png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size. = 0; |
| 526 | } |
| 527 | png_ptr->save_buffer_ptrcxx . . $ png_struct_def#save_buffer_ptr. = png_ptr->save_buffercxx . . $ png_struct_def#save_buffer.; |
| 528 | png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size. = 0; |
| 529 | } |
| 530 | |
| 531 | void /* PRIVATE */ |
| 532 | png_push_restore_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:239:9`!(png_structrpcxx . . $ png_structrp# png_ptr, png_bytepcxx . . $ png_bytep# buffer, |
| 533 | size_t buffer_length) |
| 534 | { |
| 535 | png_ptr->current_buffercxx . . $ png_struct_def#current_buffer. = buffer; |
| 536 | png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size. = buffer_length; |
| 537 | png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size. = buffer_length + png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size.; |
| 538 | png_ptr->current_buffer_ptrcxx . . $ png_struct_def#current_buffer_ptr. = png_ptr->current_buffercxx . . $ png_struct_def#current_buffer.; |
| 539 | } |
| 540 | |
| 541 | void /* PRIVATE */ |
| 542 | png_push_read_IDATcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:236:9`!(png_structrpcxx . . $ png_structrp# png_ptr) |
| 543 | { |
| 544 | if ((png_ptr->modecxx . . $ png_struct_def#mode. & PNG_HAVE_CHUNK_HEADERcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:657:9`!) == 0) |
| 545 | { |
| 546 | png_bytecxx . . $ png_byte# chunk_length[4]; |
| 547 | png_bytecxx . . $ png_byte# chunk_tag[4]; |
| 548 | |
| 549 | /* TODO: this code can be commoned up with the same code in push_read */ |
| 550 | PNG_PUSH_SAVE_BUFFER_IF_LTcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:31:9`!(8) |
| 551 | png_push_fill_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:231:9`!(png_ptr, chunk_length, 4); |
| 552 | png_ptr->push_lengthcxx . . $ png_struct_def#push_length. = png_get_uint_31cxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:157:9`!(png_ptr, chunk_length); |
| 553 | png_reset_crccxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:261:9`!(png_ptr); |
| 554 | png_crc_readcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:56:9`!(png_ptr, chunk_tag, 4); |
| 555 | png_ptr->chunk_namecxx . . $ png_struct_def#chunk_name. = PNG_CHUNK_FROM_STRINGcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:904:9`!(chunk_tag); |
| 556 | png_ptr->modecxx . . $ png_struct_def#mode. |= PNG_HAVE_CHUNK_HEADERcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:657:9`!; |
| 557 | |
| 558 | if (png_ptr->chunk_namecxx . . $ png_struct_def#chunk_name. != png_IDATcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:873:9`!) |
| 559 | { |
| 560 | png_ptr->process_modecxx . . $ png_struct_def#process_mode. = PNG_READ_CHUNK_MODEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:20:9`!; |
| 561 | |
| 562 | if ((png_ptr->flagscxx . . $ png_struct_def#flags. & PNG_FLAG_ZSTREAM_ENDEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:707:9`!) == 0) |
| 563 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "Not enough compressed data"); |
| 564 | |
| 565 | return; |
| 566 | } |
| 567 | |
| 568 | png_ptr->idat_sizecxx . . $ png_struct_def#idat_size. = png_ptr->push_lengthcxx . . $ png_struct_def#push_length.; |
| 569 | } |
| 570 | |
| 571 | if (png_ptr->idat_sizecxx . . $ png_struct_def#idat_size. != 0 && png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size. != 0) |
| 572 | { |
| 573 | size_t save_size = png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size.; |
| 574 | png_uint_32cxx . . $ png_uint_32# idat_size = png_ptr->idat_sizecxx . . $ png_struct_def#idat_size.; |
| 575 | |
| 576 | /* We want the smaller of 'idat_size' and 'current_buffer_size', but they |
| 577 | * are of different types and we don't know which variable has the fewest |
| 578 | * bits. Carefully select the smaller and cast it to the type of the |
| 579 | * larger - this cannot overflow. Do not cast in the following test - it |
| 580 | * will break on either 16-bit or 64-bit platforms. |
| 581 | */ |
| 582 | if (idat_size < save_size) |
| 583 | save_size = (size_t)idat_size; |
| 584 | |
| 585 | else |
| 586 | idat_size = (png_uint_32cxx . . $ png_uint_32#)save_size; |
| 587 | |
| 588 | png_calculate_crccxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:27:9`!(png_ptr, png_ptr->save_buffer_ptrcxx . . $ png_struct_def#save_buffer_ptr., save_size); |
| 589 | |
| 590 | png_process_IDAT_datacxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:225:9`!(png_ptr, png_ptr->save_buffer_ptrcxx . . $ png_struct_def#save_buffer_ptr., save_size); |
| 591 | |
| 592 | png_ptr->idat_sizecxx . . $ png_struct_def#idat_size. -= idat_size; |
| 593 | png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size. -= save_size; |
| 594 | png_ptr->save_buffer_sizecxx . . $ png_struct_def#save_buffer_size. -= save_size; |
| 595 | png_ptr->save_buffer_ptrcxx . . $ png_struct_def#save_buffer_ptr. += save_size; |
| 596 | } |
| 597 | |
| 598 | if (png_ptr->idat_sizecxx . . $ png_struct_def#idat_size. != 0 && png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size. != 0) |
| 599 | { |
| 600 | size_t save_size = png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size.; |
| 601 | png_uint_32cxx . . $ png_uint_32# idat_size = png_ptr->idat_sizecxx . . $ png_struct_def#idat_size.; |
| 602 | |
| 603 | /* We want the smaller of 'idat_size' and 'current_buffer_size', but they |
| 604 | * are of different types and we don't know which variable has the fewest |
| 605 | * bits. Carefully select the smaller and cast it to the type of the |
| 606 | * larger - this cannot overflow. |
| 607 | */ |
| 608 | if (idat_size < save_size) |
| 609 | save_size = (size_t)idat_size; |
| 610 | |
| 611 | else |
| 612 | idat_size = (png_uint_32cxx . . $ png_uint_32#)save_size; |
| 613 | |
| 614 | png_calculate_crccxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:27:9`!(png_ptr, png_ptr->current_buffer_ptrcxx . . $ png_struct_def#current_buffer_ptr., save_size); |
| 615 | |
| 616 | png_process_IDAT_datacxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:225:9`!(png_ptr, png_ptr->current_buffer_ptrcxx . . $ png_struct_def#current_buffer_ptr., save_size); |
| 617 | |
| 618 | png_ptr->idat_sizecxx . . $ png_struct_def#idat_size. -= idat_size; |
| 619 | png_ptr->buffer_sizecxx . . $ png_struct_def#buffer_size. -= save_size; |
| 620 | png_ptr->current_buffer_sizecxx . . $ png_struct_def#current_buffer_size. -= save_size; |
| 621 | png_ptr->current_buffer_ptrcxx . . $ png_struct_def#current_buffer_ptr. += save_size; |
| 622 | } |
| 623 | |
| 624 | if (png_ptr->idat_sizecxx . . $ png_struct_def#idat_size. == 0) |
| 625 | { |
| 626 | PNG_PUSH_SAVE_BUFFER_IF_LTcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpread.c:31:9`!(4) |
| 627 | png_crc_finishcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:55:9`!(png_ptr, 0); |
| 628 | png_ptr->modecxx . . $ png_struct_def#mode. &= ~PNG_HAVE_CHUNK_HEADERcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:657:9`!; |
| 629 | png_ptr->modecxx . . $ png_struct_def#mode. |= PNG_AFTER_IDATcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:645:9`!; |
| 630 | png_ptr->zownercxx . . $ png_struct_def#zowner. = 0; |
| 631 | } |
| 632 | } |
| 633 | |
| 634 | void /* PRIVATE */ |
| 635 | png_process_IDAT_datacxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:225:9`!(png_structrpcxx . . $ png_structrp# png_ptr, png_bytepcxx . . $ png_bytep# buffer, |
| 636 | size_t buffer_length) |
| 637 | { |
| 638 | /* The caller checks for a non-zero buffer length. */ |
| 639 | if (!(buffer_length > 0) || buffer == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 640 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "No IDAT data (internal error)"); |
| 641 | |
| 642 | /* This routine must process all the data it has been given |
| 643 | * before returning, calling the row callback as required to |
| 644 | * handle the uncompressed results. |
| 645 | */ |
| 646 | png_ptr->zstreamcxx . . $ png_struct_def#zstream..next_incxx . . $ z_stream_s#next_in. = buffer; |
| 647 | /* TODO: WARNING: TRUNCATION ERROR: DANGER WILL ROBINSON: */ |
| 648 | png_ptr->zstreamcxx . . $ png_struct_def#zstream..avail_incxx . . $ z_stream_s#avail_in. = (uIntcxx . . $ `build/Modules/ThirdParty/ZLIB/src/itkzlib-ng/zlib_name_mangling.h:149:9`!)buffer_length; |
| 649 | |
| 650 | /* Keep going until the decompressed data is all processed |
| 651 | * or the stream marked as finished. |
| 652 | */ |
| 653 | while (png_ptr->zstreamcxx . . $ png_struct_def#zstream..avail_incxx . . $ z_stream_s#avail_in. > 0 && |
| 654 | (png_ptr->flagscxx . . $ png_struct_def#flags. & PNG_FLAG_ZSTREAM_ENDEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:707:9`!) == 0) |
| 655 | { |
| 656 | int ret; |
| 657 | |
| 658 | /* We have data for zlib, but we must check that zlib |
| 659 | * has someplace to put the results. It doesn't matter |
| 660 | * if we don't expect any results -- it may be the input |
| 661 | * data is just the LZ end code. |
| 662 | */ |
| 663 | if (!(png_ptr->zstreamcxx . . $ png_struct_def#zstream..avail_outcxx . . $ z_stream_s#avail_out. > 0)) |
| 664 | { |
| 665 | /* TODO: WARNING: TRUNCATION ERROR: DANGER WILL ROBINSON: */ |
| 666 | png_ptr->zstreamcxx . . $ png_struct_def#zstream..avail_outcxx . . $ z_stream_s#avail_out. = (uIntcxx . . $ `build/Modules/ThirdParty/ZLIB/src/itkzlib-ng/zlib_name_mangling.h:149:9`!)(PNG_ROWBYTEScxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:763:9`!(png_ptr->pixel_depth, |
| 667 | png_ptr->iwidth) + 1); |
| 668 | |
| 669 | png_ptr->zstreamcxx . . $ png_struct_def#zstream..next_outcxx . . $ z_stream_s#next_out. = png_ptr->row_bufcxx . . $ png_struct_def#row_buf.; |
| 670 | } |
| 671 | |
| 672 | /* Using Z_SYNC_FLUSH here means that an unterminated |
| 673 | * LZ stream (a stream with a missing end code) can still |
| 674 | * be handled, otherwise (Z_NO_FLUSH) a future zlib |
| 675 | * implementation might defer output and therefore |
| 676 | * change the current behavior (see comments in inflate.c |
| 677 | * for why this doesn't happen at present with zlib 1.2.5). |
| 678 | */ |
| 679 | ret = PNG_INFLATEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:1455:11`!(png_ptr, Z_SYNC_FLUSHcxx . . $ `build/Modules/ThirdParty/ZLIB/src/itkzlib-ng/zlib.h:181:9`!); |
| 680 | |
| 681 | /* Check for any failure before proceeding. */ |
| 682 | if (ret != Z_OKcxx . . $ `build/Modules/ThirdParty/ZLIB/src/itkzlib-ng/zlib.h:188:9`! && ret != Z_STREAM_ENDcxx . . $ `build/Modules/ThirdParty/ZLIB/src/itkzlib-ng/zlib.h:189:9`!) |
| 683 | { |
| 684 | /* Terminate the decompression. */ |
| 685 | png_ptr->flagscxx . . $ png_struct_def#flags. |= PNG_FLAG_ZSTREAM_ENDEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:707:9`!; |
| 686 | png_ptr->zownercxx . . $ png_struct_def#zowner. = 0; |
| 687 | |
| 688 | /* This may be a truncated stream (missing or |
| 689 | * damaged end code). Treat that as a warning. |
| 690 | */ |
| 691 | if (png_ptr->row_numbercxx . . $ png_struct_def#row_number. >= png_ptr->num_rowscxx . . $ png_struct_def#num_rows. || |
| 692 | png_ptr->passcxx . . $ png_struct_def#pass. > 6) |
| 693 | png_warningcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:373:9`!(png_ptr, "Truncated compressed data in IDAT"); |
| 694 | |
| 695 | else |
| 696 | { |
| 697 | if (ret == Z_DATA_ERRORcxx . . $ `build/Modules/ThirdParty/ZLIB/src/itkzlib-ng/zlib.h:193:9`!) |
| 698 | png_benign_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:24:9`!(png_ptr, "IDAT: ADLER32 checksum mismatch"); |
| 699 | else |
| 700 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "Decompression error in IDAT"); |
| 701 | } |
| 702 | |
| 703 | /* Skip the check on unprocessed input */ |
| 704 | return; |
| 705 | } |
| 706 | |
| 707 | /* Did inflate output any data? */ |
| 708 | if (png_ptr->zstreamcxx . . $ png_struct_def#zstream..next_outcxx . . $ z_stream_s#next_out. != png_ptr->row_bufcxx . . $ png_struct_def#row_buf.) |
| 709 | { |
| 710 | /* Is this unexpected data after the last row? |
| 711 | * If it is, artificially terminate the LZ output |
| 712 | * here. |
| 713 | */ |
| 714 | if (png_ptr->row_numbercxx . . $ png_struct_def#row_number. >= png_ptr->num_rowscxx . . $ png_struct_def#num_rows. || |
| 715 | png_ptr->passcxx . . $ png_struct_def#pass. > 6) |
| 716 | { |
| 717 | /* Extra data. */ |
| 718 | png_warningcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:373:9`!(png_ptr, "Extra compressed data in IDAT"); |
| 719 | png_ptr->flagscxx . . $ png_struct_def#flags. |= PNG_FLAG_ZSTREAM_ENDEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:707:9`!; |
| 720 | png_ptr->zownercxx . . $ png_struct_def#zowner. = 0; |
| 721 | |
| 722 | /* Do no more processing; skip the unprocessed |
| 723 | * input check below. |
| 724 | */ |
| 725 | return; |
| 726 | } |
| 727 | |
| 728 | /* Do we have a complete row? */ |
| 729 | if (png_ptr->zstreamcxx . . $ png_struct_def#zstream..avail_outcxx . . $ z_stream_s#avail_out. == 0) |
| 730 | png_push_process_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:235:9`!(png_ptr); |
| 731 | } |
| 732 | |
| 733 | /* And check for the end of the stream. */ |
| 734 | if (ret == Z_STREAM_ENDcxx . . $ `build/Modules/ThirdParty/ZLIB/src/itkzlib-ng/zlib.h:189:9`!) |
| 735 | png_ptr->flagscxx . . $ png_struct_def#flags. |= PNG_FLAG_ZSTREAM_ENDEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:707:9`!; |
| 736 | } |
| 737 | |
| 738 | /* All the data should have been processed, if anything |
| 739 | * is left at this point we have bytes of IDAT data |
| 740 | * after the zlib end code. |
| 741 | */ |
| 742 | if (png_ptr->zstreamcxx . . $ png_struct_def#zstream..avail_incxx . . $ z_stream_s#avail_in. > 0) |
| 743 | png_warningcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:373:9`!(png_ptr, "Extra compression data in IDAT"); |
| 744 | } |
| 745 | |
| 746 | void /* PRIVATE */ |
| 747 | png_push_process_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:235:9`!(png_structrpcxx . . $ png_structrp# png_ptr) |
| 748 | { |
| 749 | /* 1.5.6: row_info moved out of png_struct to a local here. */ |
| 750 | png_row_infocxx . . $ png_row_info# row_info; |
| 751 | |
| 752 | row_info.widthcxx . . $ png_row_info_struct#width. = png_ptr->iwidthcxx . . $ png_struct_def#iwidth.; /* NOTE: width of current interlaced row */ |
| 753 | row_info.color_typecxx . . $ png_row_info_struct#color_type. = png_ptr->color_typecxx . . $ png_struct_def#color_type.; |
| 754 | row_info.bit_depthcxx . . $ png_row_info_struct#bit_depth. = png_ptr->bit_depthcxx . . $ png_struct_def#bit_depth.; |
| 755 | row_info.channelscxx . . $ png_row_info_struct#channels. = png_ptr->channelscxx . . $ png_struct_def#channels.; |
| 756 | row_info.pixel_depthcxx . . $ png_row_info_struct#pixel_depth. = png_ptr->pixel_depthcxx . . $ png_struct_def#pixel_depth.; |
| 757 | row_info.rowbytescxx . . $ png_row_info_struct#rowbytes. = PNG_ROWBYTEScxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:763:9`!(row_info.pixel_depth, row_info.width); |
| 758 | |
| 759 | if (png_ptr->row_bufcxx . . $ png_struct_def#row_buf.[0] > PNG_FILTER_VALUE_NONEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:1475:9`!) |
| 760 | { |
| 761 | if (png_ptr->row_bufcxx . . $ png_struct_def#row_buf.[0] < PNG_FILTER_VALUE_LASTcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/png.h:1480:9`!) |
| 762 | png_read_filter_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:245:9`!(png_ptr, &row_info, png_ptr->row_bufcxx . . $ png_struct_def#row_buf. + 1, |
| 763 | png_ptr->prev_rowcxx . . $ png_struct_def#prev_row. + 1, png_ptr->row_bufcxx . . $ png_struct_def#row_buf.[0]); |
| 764 | else |
| 765 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "bad adaptive filter value"); |
| 766 | } |
| 767 | |
| 768 | /* libpng 1.5.6: the following line was copying png_ptr->rowbytes before |
| 769 | * 1.5.6, while the buffer really is this big in current versions of libpng |
| 770 | * it may not be in the future, so this was changed just to copy the |
| 771 | * interlaced row count: |
| 772 | */ |
| 773 | memcpycxx . . $ memcpy(cc817cb175f282d).(png_ptr->prev_rowcxx . . $ png_struct_def#prev_row., png_ptr->row_bufcxx . . $ png_struct_def#row_buf., row_info.rowbytescxx . . $ png_row_info_struct#rowbytes. + 1); |
| 774 | |
| 775 | #ifdef PNG_READ_TRANSFORMS_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:85:9`! |
| 776 | if (png_ptr->transformationscxx . . $ png_struct_def#transformations. != 0) |
| 777 | png_do_read_transformationscxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:79:9`!(png_ptr, &row_info); |
| 778 | #endif |
| 779 | |
| 780 | /* The transformed pixel depth should match the depth now in row_info. */ |
| 781 | if (png_ptr->transformed_pixel_depthcxx . . $ png_struct_def#transformed_pixel_depth. == 0) |
| 782 | { |
| 783 | png_ptr->transformed_pixel_depthcxx . . $ png_struct_def#transformed_pixel_depth. = row_info.pixel_depthcxx . . $ png_row_info_struct#pixel_depth.; |
| 784 | if (row_info.pixel_depthcxx . . $ png_row_info_struct#pixel_depth. > png_ptr->maximum_pixel_depthcxx . . $ png_struct_def#maximum_pixel_depth.) |
| 785 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "progressive row overflow"); |
| 786 | } |
| 787 | |
| 788 | else if (png_ptr->transformed_pixel_depthcxx . . $ png_struct_def#transformed_pixel_depth. != row_info.pixel_depthcxx . . $ png_row_info_struct#pixel_depth.) |
| 789 | png_errorcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:84:9`!(png_ptr, "internal progressive row size calculation error"); |
| 790 | |
| 791 | |
| 792 | #ifdef PNG_READ_INTERLACING_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:68:9`! |
| 793 | /* Expand interlaced rows to full size */ |
| 794 | if (png_ptr->interlacedcxx . . $ png_struct_def#interlaced. != 0 && |
| 795 | (png_ptr->transformationscxx . . $ png_struct_def#transformations. & PNG_INTERLACEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:668:9`!) != 0) |
| 796 | { |
| 797 | if (png_ptr->passcxx . . $ png_struct_def#pass. < 6) |
| 798 | png_do_read_interlacecxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:78:9`!(&row_info, png_ptr->row_bufcxx . . $ png_struct_def#row_buf. + 1, png_ptr->passcxx . . $ png_struct_def#pass., |
| 799 | png_ptr->transformationscxx . . $ png_struct_def#transformations.); |
| 800 | |
| 801 | switch (png_ptr->passcxx . . $ png_struct_def#pass.) |
| 802 | { |
| 803 | case 0: |
| 804 | { |
| 805 | int i; |
| 806 | for (i = 0; i < 8 && png_ptr->passcxx . . $ png_struct_def#pass. == 0; i++) |
| 807 | { |
| 808 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, png_ptr->row_bufcxx . . $ png_struct_def#row_buf. + 1); |
| 809 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); /* Updates png_ptr->pass */ |
| 810 | } |
| 811 | |
| 812 | if (png_ptr->passcxx . . $ png_struct_def#pass. == 2) /* Pass 1 might be empty */ |
| 813 | { |
| 814 | for (i = 0; i < 4 && png_ptr->passcxx . . $ png_struct_def#pass. == 2; i++) |
| 815 | { |
| 816 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 817 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | if (png_ptr->passcxx . . $ png_struct_def#pass. == 4 && png_ptr->heightcxx . . $ png_struct_def#height. <= 4) |
| 822 | { |
| 823 | for (i = 0; i < 2 && png_ptr->passcxx . . $ png_struct_def#pass. == 4; i++) |
| 824 | { |
| 825 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 826 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 827 | } |
| 828 | } |
| 829 | |
| 830 | if (png_ptr->passcxx . . $ png_struct_def#pass. == 6 && png_ptr->heightcxx . . $ png_struct_def#height. <= 4) |
| 831 | { |
| 832 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 833 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 834 | } |
| 835 | |
| 836 | break; |
| 837 | } |
| 838 | |
| 839 | case 1: |
| 840 | { |
| 841 | int i; |
| 842 | for (i = 0; i < 8 && png_ptr->passcxx . . $ png_struct_def#pass. == 1; i++) |
| 843 | { |
| 844 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, png_ptr->row_bufcxx . . $ png_struct_def#row_buf. + 1); |
| 845 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 846 | } |
| 847 | |
| 848 | if (png_ptr->passcxx . . $ png_struct_def#pass. == 2) /* Skip top 4 generated rows */ |
| 849 | { |
| 850 | for (i = 0; i < 4 && png_ptr->passcxx . . $ png_struct_def#pass. == 2; i++) |
| 851 | { |
| 852 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 853 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 854 | } |
| 855 | } |
| 856 | |
| 857 | break; |
| 858 | } |
| 859 | |
| 860 | case 2: |
| 861 | { |
| 862 | int i; |
| 863 | |
| 864 | for (i = 0; i < 4 && png_ptr->passcxx . . $ png_struct_def#pass. == 2; i++) |
| 865 | { |
| 866 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, png_ptr->row_bufcxx . . $ png_struct_def#row_buf. + 1); |
| 867 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 868 | } |
| 869 | |
| 870 | for (i = 0; i < 4 && png_ptr->passcxx . . $ png_struct_def#pass. == 2; i++) |
| 871 | { |
| 872 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 873 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 874 | } |
| 875 | |
| 876 | if (png_ptr->passcxx . . $ png_struct_def#pass. == 4) /* Pass 3 might be empty */ |
| 877 | { |
| 878 | for (i = 0; i < 2 && png_ptr->passcxx . . $ png_struct_def#pass. == 4; i++) |
| 879 | { |
| 880 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 881 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 882 | } |
| 883 | } |
| 884 | |
| 885 | break; |
| 886 | } |
| 887 | |
| 888 | case 3: |
| 889 | { |
| 890 | int i; |
| 891 | |
| 892 | for (i = 0; i < 4 && png_ptr->passcxx . . $ png_struct_def#pass. == 3; i++) |
| 893 | { |
| 894 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, png_ptr->row_bufcxx . . $ png_struct_def#row_buf. + 1); |
| 895 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 896 | } |
| 897 | |
| 898 | if (png_ptr->passcxx . . $ png_struct_def#pass. == 4) /* Skip top two generated rows */ |
| 899 | { |
| 900 | for (i = 0; i < 2 && png_ptr->passcxx . . $ png_struct_def#pass. == 4; i++) |
| 901 | { |
| 902 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 903 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 904 | } |
| 905 | } |
| 906 | |
| 907 | break; |
| 908 | } |
| 909 | |
| 910 | case 4: |
| 911 | { |
| 912 | int i; |
| 913 | |
| 914 | for (i = 0; i < 2 && png_ptr->passcxx . . $ png_struct_def#pass. == 4; i++) |
| 915 | { |
| 916 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, png_ptr->row_bufcxx . . $ png_struct_def#row_buf. + 1); |
| 917 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 918 | } |
| 919 | |
| 920 | for (i = 0; i < 2 && png_ptr->passcxx . . $ png_struct_def#pass. == 4; i++) |
| 921 | { |
| 922 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 923 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 924 | } |
| 925 | |
| 926 | if (png_ptr->passcxx . . $ png_struct_def#pass. == 6) /* Pass 5 might be empty */ |
| 927 | { |
| 928 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 929 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 930 | } |
| 931 | |
| 932 | break; |
| 933 | } |
| 934 | |
| 935 | case 5: |
| 936 | { |
| 937 | int i; |
| 938 | |
| 939 | for (i = 0; i < 2 && png_ptr->passcxx . . $ png_struct_def#pass. == 5; i++) |
| 940 | { |
| 941 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, png_ptr->row_bufcxx . . $ png_struct_def#row_buf. + 1); |
| 942 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 943 | } |
| 944 | |
| 945 | if (png_ptr->passcxx . . $ png_struct_def#pass. == 6) /* Skip top generated row */ |
| 946 | { |
| 947 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 948 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 949 | } |
| 950 | |
| 951 | break; |
| 952 | } |
| 953 | |
| 954 | default: |
| 955 | case 6: |
| 956 | { |
| 957 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, png_ptr->row_bufcxx . . $ png_struct_def#row_buf. + 1); |
| 958 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 959 | |
| 960 | if (png_ptr->passcxx . . $ png_struct_def#pass. != 6) |
| 961 | break; |
| 962 | |
| 963 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 964 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 965 | } |
| 966 | } |
| 967 | } |
| 968 | else |
| 969 | #endif |
| 970 | { |
| 971 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_ptr, png_ptr->row_bufcxx . . $ png_struct_def#row_buf. + 1); |
| 972 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_ptr); |
| 973 | } |
| 974 | } |
| 975 | |
| 976 | void /* PRIVATE */ |
| 977 | png_read_push_finish_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:251:9`!(png_structrpcxx . . $ png_structrp# png_ptr) |
| 978 | { |
| 979 | #ifdef PNG_READ_INTERLACING_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:68:9`! |
| 980 | /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ |
| 981 | |
| 982 | /* Start of interlace block */ |
| 983 | static const png_bytecxx . . $ png_byte# png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; |
| 984 | |
| 985 | /* Offset to next interlace block */ |
| 986 | static const png_bytecxx . . $ png_byte# png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; |
| 987 | |
| 988 | /* Start of interlace block in the y direction */ |
| 989 | static const png_bytecxx . . $ png_byte# png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; |
| 990 | |
| 991 | /* Offset to next interlace block in the y direction */ |
| 992 | static const png_bytecxx . . $ png_byte# png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; |
| 993 | |
| 994 | /* Height of interlace block. This is not currently used - if you need |
| 995 | * it, uncomment it here and in png.h |
| 996 | static const png_byte png_pass_height[] = {8, 8, 4, 4, 2, 2, 1}; |
| 997 | */ |
| 998 | #endif |
| 999 | |
| 1000 | png_ptr->row_numbercxx . . $ png_struct_def#row_number.++; |
| 1001 | if (png_ptr->row_numbercxx . . $ png_struct_def#row_number. < png_ptr->num_rowscxx . . $ png_struct_def#num_rows.) |
| 1002 | return; |
| 1003 | |
| 1004 | #ifdef PNG_READ_INTERLACING_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:68:9`! |
| 1005 | if (png_ptr->interlacedcxx . . $ png_struct_def#interlaced. != 0) |
| 1006 | { |
| 1007 | png_ptr->row_numbercxx . . $ png_struct_def#row_number. = 0; |
| 1008 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(png_ptr->prev_rowcxx . . $ png_struct_def#prev_row., 0, png_ptr->rowbytescxx . . $ png_struct_def#rowbytes. + 1); |
| 1009 | |
| 1010 | do |
| 1011 | { |
| 1012 | png_ptr->passcxx . . $ png_struct_def#pass.++; |
| 1013 | if ((png_ptr->passcxx . . $ png_struct_def#pass. == 1 && png_ptr->widthcxx . . $ png_struct_def#width. < 5) || |
| 1014 | (png_ptr->passcxx . . $ png_struct_def#pass. == 3 && png_ptr->widthcxx . . $ png_struct_def#width. < 3) || |
| 1015 | (png_ptr->passcxx . . $ png_struct_def#pass. == 5 && png_ptr->widthcxx . . $ png_struct_def#width. < 2)) |
| 1016 | png_ptr->passcxx . . $ png_struct_def#pass.++; |
| 1017 | |
| 1018 | if (png_ptr->passcxx . . $ png_struct_def#pass. > 7) |
| 1019 | png_ptr->passcxx . . $ png_struct_def#pass.--; |
| 1020 | |
| 1021 | if (png_ptr->passcxx . . $ png_struct_def#pass. >= 7) |
| 1022 | break; |
| 1023 | |
| 1024 | png_ptr->iwidthcxx . . $ png_struct_def#iwidth. = (png_ptr->widthcxx . . $ png_struct_def#width. + |
| 1025 | png_pass_inc[png_ptr->passcxx . . $ png_struct_def#pass.] - 1 - |
| 1026 | png_pass_start[png_ptr->passcxx . . $ png_struct_def#pass.]) / |
| 1027 | png_pass_inc[png_ptr->passcxx . . $ png_struct_def#pass.]; |
| 1028 | |
| 1029 | if ((png_ptr->transformationscxx . . $ png_struct_def#transformations. & PNG_INTERLACEcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngpriv.h:668:9`!) != 0) |
| 1030 | break; |
| 1031 | |
| 1032 | png_ptr->num_rowscxx . . $ png_struct_def#num_rows. = (png_ptr->heightcxx . . $ png_struct_def#height. + |
| 1033 | png_pass_yinc[png_ptr->passcxx . . $ png_struct_def#pass.] - 1 - |
| 1034 | png_pass_ystart[png_ptr->passcxx . . $ png_struct_def#pass.]) / |
| 1035 | png_pass_yinc[png_ptr->passcxx . . $ png_struct_def#pass.]; |
| 1036 | |
| 1037 | } while (png_ptr->iwidthcxx . . $ png_struct_def#iwidth. == 0 || png_ptr->num_rowscxx . . $ png_struct_def#num_rows. == 0); |
| 1038 | } |
| 1039 | #endif /* READ_INTERLACING */ |
| 1040 | } |
| 1041 | |
| 1042 | void /* PRIVATE */ |
| 1043 | png_push_have_infocxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:233:9`!(png_structrpcxx . . $ png_structrp# png_ptr, png_inforpcxx . . $ png_inforp# info_ptr) |
| 1044 | { |
| 1045 | if (png_ptr->info_fncxx . . $ png_struct_def#info_fn. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1046 | (*(png_ptr->info_fncxx . . $ png_struct_def#info_fn.))(png_ptr, info_ptr); |
| 1047 | } |
| 1048 | |
| 1049 | void /* PRIVATE */ |
| 1050 | png_push_have_endcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:232:9`!(png_structrpcxx . . $ png_structrp# png_ptr, png_inforpcxx . . $ png_inforp# info_ptr) |
| 1051 | { |
| 1052 | if (png_ptr->end_fncxx . . $ png_struct_def#end_fn. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1053 | (*(png_ptr->end_fncxx . . $ png_struct_def#end_fn.))(png_ptr, info_ptr); |
| 1054 | } |
| 1055 | |
| 1056 | void /* PRIVATE */ |
| 1057 | png_push_have_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:234:9`!(png_structrpcxx . . $ png_structrp# png_ptr, png_bytepcxx . . $ png_bytep# row) |
| 1058 | { |
| 1059 | if (png_ptr->row_fncxx . . $ png_struct_def#row_fn. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1060 | (*(png_ptr->row_fncxx . . $ png_struct_def#row_fn.))(png_ptr, row, png_ptr->row_numbercxx . . $ png_struct_def#row_number., |
| 1061 | (int)png_ptr->passcxx . . $ png_struct_def#pass.); |
| 1062 | } |
| 1063 | |
| 1064 | #ifdef PNG_READ_INTERLACING_SUPPORTEDcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pnglibconf.h:68:9`! |
| 1065 | void PNGAPIcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngconf.h:262:11`! |
| 1066 | png_progressive_combine_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:230:9`!(png_const_structrpcxx . . $ png_const_structrp# png_ptr, png_bytepcxx . . $ png_bytep# old_row, |
| 1067 | png_const_bytepcxx . . $ png_const_bytep# new_row) |
| 1068 | { |
| 1069 | if (png_ptr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1070 | return; |
| 1071 | |
| 1072 | /* new_row is a flag here - if it is NULL then the app callback was called |
| 1073 | * from an empty row (see the calls to png_struct::row_fn below), otherwise |
| 1074 | * it must be png_ptr->row_buf+1 |
| 1075 | */ |
| 1076 | if (new_row != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1077 | png_combine_rowcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:48:9`!(png_ptr, old_row, 1/*blocky display*/); |
| 1078 | } |
| 1079 | #endif /* READ_INTERLACING */ |
| 1080 | |
| 1081 | void PNGAPIcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngconf.h:262:11`! |
| 1082 | png_set_progressive_read_fncxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:330:9`!(png_structrpcxx . . $ png_structrp# png_ptr, png_voidpcxx . . $ png_voidp# progressive_ptr, |
| 1083 | png_progressive_info_ptrcxx . . $ png_progressive_info_ptr# info_fn, png_progressive_row_ptrcxx . . $ png_progressive_row_ptr# row_fn, |
| 1084 | png_progressive_end_ptrcxx . . $ png_progressive_end_ptr# end_fn) |
| 1085 | { |
| 1086 | if (png_ptr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1087 | return; |
| 1088 | |
| 1089 | png_ptr->info_fncxx . . $ png_struct_def#info_fn. = info_fn; |
| 1090 | png_ptr->row_fncxx . . $ png_struct_def#row_fn. = row_fn; |
| 1091 | png_ptr->end_fncxx . . $ png_struct_def#end_fn. = end_fn; |
| 1092 | |
| 1093 | png_set_read_fncxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:332:9`!(png_ptr, progressive_ptr, png_push_fill_buffercxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:231:9`!); |
| 1094 | } |
| 1095 | |
| 1096 | png_voidpcxx . . $ png_voidp# PNGAPIcxx . . $ `Modules/ThirdParty/PNG/src/itkpng/pngconf.h:262:11`! |
| 1097 | png_get_progressive_ptrcxx . . $ `build/Modules/ThirdParty/PNG/src/itkpng/itk_png_mangle.h:143:9`!(png_const_structrpcxx . . $ png_const_structrp# png_ptr) |
| 1098 | { |
| 1099 | if (png_ptr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1100 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1101 | |
| 1102 | return png_ptr->io_ptrcxx . . $ png_struct_def#io_ptr.; |
| 1103 | } |
| 1104 | #endif /* PROGRESSIVE_READ */ |