This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via cca1a95d0c61b096110045f796c86ab02703362f (commit) from ed03e7bc0d0825a97e73887be30e768cc0f8aeec (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/cca1a95d0c61b096110045f796c86ab027033...
commit cca1a95d0c61b096110045f796c86ab02703362f Author: Cyril Hrubis metan@ucw.cz Date: Mon May 28 00:35:19 2012 +0200
loaders: PNG More work on metadata.
diff --git a/libs/loaders/GP_PNG.c b/libs/loaders/GP_PNG.c index 2cef50d..7602fe7 100644 --- a/libs/loaders/GP_PNG.c +++ b/libs/loaders/GP_PNG.c @@ -270,6 +270,17 @@ static void load_meta_data(png_structp png, png_infop png_info, GP_MetaData *dat GP_MetaDataCreateString(data, "res_unit", unit_name, 0); }
+ png_timep mod_time; + + if (png_get_tIME(png, png_info, &mod_time)) { + GP_MetaDataCreateInt(data, "mod_sec", mod_time->second); + GP_MetaDataCreateInt(data, "mod_min", mod_time->minute); + GP_MetaDataCreateInt(data, "mod_hour", mod_time->hour); + GP_MetaDataCreateInt(data, "mod_day", mod_time->day); + GP_MetaDataCreateInt(data, "mod_mon", mod_time->month); + GP_MetaDataCreateInt(data, "mod_year", mod_time->year); + } + double width, height;
if (png_get_sCAL(png, png_info, &unit, &width, &height)) { @@ -277,6 +288,23 @@ static void load_meta_data(png_structp png, png_infop png_info, GP_MetaData *dat GP_MetaDataCreateInt(data, "height", height * 1000); GP_MetaDataCreateInt(data, "unit", unit); } + + png_textp text_ptr; + int text_cnt; + + if (png_get_text(png, png_info, &text_ptr, &text_cnt)) { + int i; + + for (i = 0; i < text_cnt; i++) { + + if (text_ptr[i].compression != PNG_TEXT_COMPRESSION_NONE) + continue; + + char buf[GP_META_RECORD_ID_MAX]; + snprintf(buf, GP_META_RECORD_ID_MAX, "text:%s", text_ptr[i].key); + GP_MetaDataCreateString(data, buf, text_ptr[i].text, 1); + } + } }
int GP_ReadPNGMetaData(FILE *f, GP_MetaData *data)
-----------------------------------------------------------------------
Summary of changes: libs/loaders/GP_PNG.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.