Mercurial > hg > forks > libbpg
comparison bpgenc.c @ 29:1a7b661841c3
Add exif_fix_data() before creating the EXIF data blob from TIFF tags to
ensure that we are as compliant as possible.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 11 May 2017 10:05:55 +0300 |
parents | 76a105267445 |
children | 6fec76de9a8d |
comparison
equal
deleted
inserted
replaced
28:76a105267445 | 29:1a7b661841c3 |
---|---|
1341 if (added) | 1341 if (added) |
1342 { | 1342 { |
1343 uint8_t *ex_buf = NULL; | 1343 uint8_t *ex_buf = NULL; |
1344 unsigned int ex_len = 0; | 1344 unsigned int ex_len = 0; |
1345 | 1345 |
1346 exif_data_fix(exif); | |
1346 exif_data_save_data(exif, &ex_buf, &ex_len); | 1347 exif_data_save_data(exif, &ex_buf, &ex_len); |
1347 | 1348 |
1348 // Strip off "Exif\x00\x00" from the data | 1349 // Strip off "Exif\x00\x00" from the data |
1349 if (ex_len > 6) | 1350 if (ex_len > 6) |
1350 bpg_add_md_contents(pmd, BPG_EXTENSION_TAG_EXIF, ex_len - 6, ex_buf + 6); | 1351 bpg_add_md_contents(pmd, BPG_EXTENSION_TAG_EXIF, ex_len - 6, ex_buf + 6); |