| 5619 | |
| 5620 | #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS |
| 5621 | static unsigned addUnknownChunks(ucvector* out, unsigned char* data, size_t datasize) |
| 5622 | { |
| 5623 | unsigned char* inchunk = data; |
| 5624 | while((size_t)(inchunk - data) < datasize) |
| 5625 | { |
| 5626 | CERROR_TRY_RETURN(lodepng_chunk_append(&out->data, &out->size, inchunk)); |
| 5627 | out->allocsize = out->size; /*fix the allocsize again*/ |
| 5628 | inchunk = lodepng_chunk_next(inchunk); |
| 5629 | } |
| 5630 | return 0; |
| 5631 | } |
| 5632 | #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ |
| 5633 | |
| 5634 | unsigned lodepng_encode(unsigned char** out, size_t* outsize, |
no test coverage detected