don't add date in ppmsave if @strip is set
see https://github.com/libvips/libvips/issues/1913
This commit is contained in:
parent
c088097b50
commit
970ba8cfcc
|
@ -10,6 +10,8 @@
|
||||||
* - add ppmsave_target
|
* - add ppmsave_target
|
||||||
* 20/11/20
|
* 20/11/20
|
||||||
* - byteswap on save, if necessary [ewelot]
|
* - byteswap on save, if necessary [ewelot]
|
||||||
|
* 2/12/20
|
||||||
|
* - don't add date with @strip [ewelot]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -212,6 +214,8 @@ vips_foreign_save_ppm_block( VipsRegion *region, VipsRect *area, void *a )
|
||||||
static int
|
static int
|
||||||
vips_foreign_save_ppm( VipsForeignSavePpm *ppm, VipsImage *image )
|
vips_foreign_save_ppm( VipsForeignSavePpm *ppm, VipsImage *image )
|
||||||
{
|
{
|
||||||
|
VipsForeignSave *save = (VipsForeignSave *) ppm;
|
||||||
|
|
||||||
char *magic;
|
char *magic;
|
||||||
char *date;
|
char *date;
|
||||||
|
|
||||||
|
@ -245,11 +249,13 @@ vips_foreign_save_ppm( VipsForeignSavePpm *ppm, VipsImage *image )
|
||||||
else
|
else
|
||||||
g_assert_not_reached();
|
g_assert_not_reached();
|
||||||
|
|
||||||
|
if( !save->strip ) {
|
||||||
vips_target_writef( ppm->target, "%s\n", magic );
|
vips_target_writef( ppm->target, "%s\n", magic );
|
||||||
date = vips__get_iso8601();
|
date = vips__get_iso8601();
|
||||||
vips_target_writef( ppm->target,
|
vips_target_writef( ppm->target,
|
||||||
"#vips2ppm - %s\n", date );
|
"#vips2ppm - %s\n", date );
|
||||||
g_free( date );
|
g_free( date );
|
||||||
|
}
|
||||||
vips_target_writef( ppm->target,
|
vips_target_writef( ppm->target,
|
||||||
"%d %d\n", image->Xsize, image->Ysize );
|
"%d %d\n", image->Xsize, image->Ysize );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue