[trunk] update convert about png writing with additional metadata (thanks winfried)

This commit is contained in:
Mickael Savinaud 2013-02-03 10:18:10 +00:00
parent 752e978d56
commit 0109b39f58
1 changed files with 6 additions and 0 deletions

View File

@ -3408,6 +3408,9 @@ int imagetopng(opj_image_t * image, const char *write_idf)
color_type, color_type,
PNG_INTERLACE_NONE, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
png_set_gamma(png, 2.2, 1./2.2);
png_set_sRGB(png, info, PNG_sRGB_INTENT_PERCEPTUAL);
/*=============================*/ /*=============================*/
png_write_info(png, info); png_write_info(png, info);
/*=============================*/ /*=============================*/
@ -3524,6 +3527,9 @@ int imagetopng(opj_image_t * image, const char *write_idf)
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
png_set_sBIT(png, info, &sig_bit); png_set_sBIT(png, info, &sig_bit);
png_set_gamma(png, 2.2, 1./2.2);
png_set_sRGB(png, info, PNG_sRGB_INTENT_PERCEPTUAL);
/*=============================*/ /*=============================*/
png_write_info(png, info); png_write_info(png, info);
/*=============================*/ /*=============================*/