Lines Matching defs:chunk
60 static int sk_read_user_chunk(png_structp png_ptr, png_unknown_chunkp chunk) {
63 return chunkReader->readChunk((const char*)chunk->name, chunk->data, chunk->size) ? 1 : -1;
130 static inline bool is_chunk(const png_byte* chunk, const char* tag) {
131 return memcmp(chunk + 4, tag, 4) == 0;
171 // Parse chunk length and type.
177 png_byte* chunk = reinterpret_cast<png_byte*>(buffer);
178 const size_t length = png_get_uint_32(chunk);
180 if (is_chunk(chunk, "IDAT")) {
185 png_process_data(fPng_ptr, fInfo_ptr, chunk, 8);
186 // Process the full chunk + CRC.
225 // Parse chunk length and type.
230 png_byte* chunk = reinterpret_cast<png_byte*>(buffer);
231 png_process_data(fPng_ptr, fInfo_ptr, chunk, 8);
232 if (is_chunk(chunk, "IEND")) {
236 length = png_get_uint_32(chunk);
245 // Process the full chunk + CRC.
346 // This is necessary because the gAMA chunk actually stores 1/gamma.
376 // an image has both truly wants the potentially more specific ICC chunk, with sRGB as a
381 // FIXME (scroggo): Extract this information from the sRGB chunk once
670 // expensive. When decoding the whole image, read through the IEND chunk to
871 // Set the alpha depending on if a transparency chunk exists.
877 // Convert to RGBA if transparency chunk exists.