add "page-height" save property
This commit is contained in:
parent
882c686553
commit
91457e455a
@ -8,6 +8,7 @@
|
|||||||
- add FORCE resize mode to break aspect ratio
|
- add FORCE resize mode to break aspect ratio
|
||||||
- add vips_thumbnail_image()
|
- add vips_thumbnail_image()
|
||||||
- better prefix guessing on Windows, thanks tumagonx
|
- better prefix guessing on Windows, thanks tumagonx
|
||||||
|
- savers support a "page_height" option for multipage save
|
||||||
|
|
||||||
12/6/17 started 8.5.7
|
12/6/17 started 8.5.7
|
||||||
- transform cmyk->rgb automatically on write if there's an embedded profile
|
- transform cmyk->rgb automatically on write if there's an embedded profile
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
* - remove max-alpha stuff, this is now automatic
|
* - remove max-alpha stuff, this is now automatic
|
||||||
* 12/6/17
|
* 12/6/17
|
||||||
* - transform cmyk->rgb if there's an embedded profile
|
* - transform cmyk->rgb if there's an embedded profile
|
||||||
|
* 16/6/17
|
||||||
|
* - add page_height
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1485,6 +1487,10 @@ vips_foreign_save_build( VipsObject *object )
|
|||||||
save->background ) )
|
save->background ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
if( save->page_height )
|
||||||
|
vips_image_set_int( ready,
|
||||||
|
VIPS_META_PAGE_HEIGHT, save->page_height );
|
||||||
|
|
||||||
VIPS_UNREF( save->ready );
|
VIPS_UNREF( save->ready );
|
||||||
save->ready = ready;
|
save->ready = ready;
|
||||||
}
|
}
|
||||||
@ -1570,6 +1576,13 @@ vips_foreign_save_class_init( VipsForeignSaveClass *class )
|
|||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignSave, background ),
|
G_STRUCT_OFFSET( VipsForeignSave, background ),
|
||||||
VIPS_TYPE_ARRAY_DOUBLE );
|
VIPS_TYPE_ARRAY_DOUBLE );
|
||||||
|
|
||||||
|
VIPS_ARG_INT( class, "page_height", 8,
|
||||||
|
_( "Page height" ),
|
||||||
|
_( "Set page height for multipage save" ),
|
||||||
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
|
G_STRUCT_OFFSET( VipsForeignSave, page_height ),
|
||||||
|
0, VIPS_MAX_COORD, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -472,6 +472,7 @@ vips_foreign_save_tiff_buffer_init( VipsForeignSaveTiffBuffer *buffer )
|
|||||||
* * @bigtiff: set %TRUE to write a BigTiff file
|
* * @bigtiff: set %TRUE to write a BigTiff file
|
||||||
* * @properties: set %TRUE to write an IMAGEDESCRIPTION tag
|
* * @properties: set %TRUE to write an IMAGEDESCRIPTION tag
|
||||||
* * @strip: set %TRUE to block metadata save
|
* * @strip: set %TRUE to block metadata save
|
||||||
|
* * @page_height: %gint for page height for multi-page save
|
||||||
*
|
*
|
||||||
* Write a VIPS image to a file as TIFF.
|
* Write a VIPS image to a file as TIFF.
|
||||||
*
|
*
|
||||||
@ -587,6 +588,7 @@ vips_tiffsave( VipsImage *in, const char *filename, ... )
|
|||||||
* * @bigtiff: set %TRUE to write a BigTiff file
|
* * @bigtiff: set %TRUE to write a BigTiff file
|
||||||
* * @properties: set %TRUE to write an IMAGEDESCRIPTION tag
|
* * @properties: set %TRUE to write an IMAGEDESCRIPTION tag
|
||||||
* * @strip: set %TRUE to block metadata save
|
* * @strip: set %TRUE to block metadata save
|
||||||
|
* * @page_height: %gint for page height for multi-page save
|
||||||
*
|
*
|
||||||
* As vips_tiffsave(), but save to a memory buffer.
|
* As vips_tiffsave(), but save to a memory buffer.
|
||||||
*
|
*
|
||||||
|
@ -279,6 +279,10 @@ typedef struct _VipsForeignSave {
|
|||||||
*/
|
*/
|
||||||
VipsArrayDouble *background;
|
VipsArrayDouble *background;
|
||||||
|
|
||||||
|
/* Set to non-zero to set the page size for multi-page save.
|
||||||
|
*/
|
||||||
|
int page_height;
|
||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
/* The image we are to save, as supplied by our caller.
|
/* The image we are to save, as supplied by our caller.
|
||||||
|
Loading…
Reference in New Issue
Block a user