| 5329 | } |
| 5330 | |
| 5331 | static unsigned addChunk_cHRM(ucvector* out, const LodePNGInfo* info) { |
| 5332 | unsigned char* chunk; |
| 5333 | CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 32, "cHRM")); |
| 5334 | lodepng_set32bitInt(chunk + 8, info->chrm_white_x); |
| 5335 | lodepng_set32bitInt(chunk + 12, info->chrm_white_y); |
| 5336 | lodepng_set32bitInt(chunk + 16, info->chrm_red_x); |
| 5337 | lodepng_set32bitInt(chunk + 20, info->chrm_red_y); |
| 5338 | lodepng_set32bitInt(chunk + 24, info->chrm_green_x); |
| 5339 | lodepng_set32bitInt(chunk + 28, info->chrm_green_y); |
| 5340 | lodepng_set32bitInt(chunk + 32, info->chrm_blue_x); |
| 5341 | lodepng_set32bitInt(chunk + 36, info->chrm_blue_y); |
| 5342 | lodepng_chunk_generate_crc(chunk); |
| 5343 | return 0; |
| 5344 | } |
| 5345 | |
| 5346 | static unsigned addChunk_sRGB(ucvector* out, const LodePNGInfo* info) { |
| 5347 | unsigned char data = info->srgb_intent; |
no test coverage detected