From d9ddf0287eaeb9a9d66ba7ade9bf8aa96f1f0d3d Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 26 Jun 2014 11:08:00 +0100 Subject: [PATCH] note date and version in dzprops --- libvips/foreign/dzsave.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/libvips/foreign/dzsave.c b/libvips/foreign/dzsave.c index b55cb1f7..6c362f42 100644 --- a/libvips/foreign/dzsave.c +++ b/libvips/foreign/dzsave.c @@ -720,15 +720,29 @@ write_vips_properties( VipsForeignSaveDz *dz ) { VipsForeignSave *save = (VipsForeignSave *) dz; + time_t timebuf; + char time_string[30]; GsfOutput *out; + time( &timebuf ); + ctime_r( &timebuf, time_string ); + + /* Remove the trailing \n. + */ + if( strlen( time_string ) > 0 && + time_string[strlen( time_string ) - 1] == '\n' ) + time_string[strlen( time_string ) - 1] = '\0'; + out = vips_gsf_path( dz->tree, "vips-properties.xml", dz->root_name, NULL ); gsf_output_printf( out, "\n" ); gsf_output_printf( out, "\n" ); - gsf_output_printf( out, " \n" ); + gsf_output_printf( out, " \n" ); (void) vips_image_map( save->ready, write_vips_property, out ); gsf_output_printf( out, " \n" ); gsf_output_printf( out, "\n" );