Merge branch 'master' into add-stream-object
This commit is contained in:
commit
8eeb415b09
|
@ -16,8 +16,9 @@
|
|||
- add @interpretation and @format to rawload
|
||||
- nifti load/save uses double for all floating point metadata
|
||||
- add vips_error_buffer_copy()
|
||||
- add VipsStream ... a universal IO class for loaders and savers
|
||||
- jpegload uses the new IO class
|
||||
- add VipsStream: a universal IO class for loaders and savers
|
||||
- jpeg, png, tiff and webp use the new IO class
|
||||
- add @no_strip option to dzsave [kalozka1]
|
||||
|
||||
31/8/19 started 8.8.3
|
||||
- revert sharpen restoring the input colourspace
|
||||
|
|
|
@ -81,6 +81,8 @@
|
|||
* - write all associated images
|
||||
* 19/12/18
|
||||
* - add @skip_blanks
|
||||
* 21/10/19
|
||||
* - add @no_strip
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -454,6 +456,7 @@ struct _VipsForeignSaveDz {
|
|||
int compression;
|
||||
VipsRegionShrink region_shrink;
|
||||
int skip_blanks;
|
||||
gboolean no_strip;
|
||||
|
||||
/* Tile and overlap geometry. The members above are the parameters we
|
||||
* accept, this next set are the derived values which are actually
|
||||
|
@ -588,12 +591,12 @@ write_image( VipsForeignSaveDz *dz,
|
|||
void *buf;
|
||||
size_t len;
|
||||
|
||||
/* Hopefully, no one will want the same metadata on all the images.
|
||||
* Strip them.
|
||||
/* We default to stripping all metadata. Only "no_strip" turns this
|
||||
* off. Very few people really want metadata on every tile.
|
||||
*/
|
||||
vips_image_set_int( image, "hide-progress", 1 );
|
||||
if( vips_image_write_to_buffer( image, format, &buf, &len,
|
||||
"strip", TRUE,
|
||||
"strip", !dz->no_strip,
|
||||
NULL ) )
|
||||
return( -1 );
|
||||
|
||||
|
@ -2332,6 +2335,13 @@ vips_foreign_save_dz_class_init( VipsForeignSaveDzClass *class )
|
|||
G_STRUCT_OFFSET( VipsForeignSaveDz, skip_blanks ),
|
||||
-1, 65535, -1 );
|
||||
|
||||
VIPS_ARG_BOOL( class, "no_strip", 20,
|
||||
_( "No strip" ),
|
||||
_( "Don't strip tile metadata" ),
|
||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||
G_STRUCT_OFFSET( VipsForeignSaveDz, no_strip ),
|
||||
FALSE );
|
||||
|
||||
/* How annoying. We stupidly had these in earlier versions.
|
||||
*/
|
||||
|
||||
|
@ -2573,6 +2583,7 @@ vips_foreign_save_dz_buffer_init( VipsForeignSaveDzBuffer *buffer )
|
|||
* * @compression: %gint zip deflate compression level
|
||||
* * @region_shrink: #VipsRegionShrink how to shrink each 2x2 region
|
||||
* * @skip_blanks: %gint skip tiles which are nearly equal to the background
|
||||
* * @no_strip: %gboolean don't strip tiles
|
||||
*
|
||||
* Save an image as a set of tiles at various resolutions. By default dzsave
|
||||
* uses DeepZoom layout -- use @layout to pick other conventions.
|
||||
|
@ -2612,6 +2623,10 @@ vips_foreign_save_dz_buffer_init( VipsForeignSaveDzBuffer *buffer )
|
|||
* programs which wish to use fields from source files loaded via
|
||||
* vips_openslideload().
|
||||
*
|
||||
* By default, all tiles are stripped, since very few people want a copy of
|
||||
* the metadata on every tile. Set @no_strip if you really want to keep
|
||||
* metadata.
|
||||
*
|
||||
* If @container is set to `zip`, you can set a compression level from -1
|
||||
* (use zlib default), 0 (store, compression disabled) to 9 (max compression).
|
||||
* If no value is given, the default is to store files without compression.
|
||||
|
@ -2665,6 +2680,7 @@ vips_dzsave( VipsImage *in, const char *name, ... )
|
|||
* * @compression: %gint zip deflate compression level
|
||||
* * @region_shrink: #VipsRegionShrink how to shrink each 2x2 region.
|
||||
* * @skip_blanks: %gint skip tiles which are nearly equal to the background
|
||||
* * @no_strip: %gboolean don't strip tiles
|
||||
*
|
||||
* As vips_dzsave(), but save to a memory buffer.
|
||||
*
|
||||
|
|
|
@ -1702,7 +1702,7 @@ vips_foreign_save_class_init( VipsForeignSaveClass *class )
|
|||
G_STRUCT_OFFSET( VipsForeignSave, background ),
|
||||
VIPS_TYPE_ARRAY_DOUBLE );
|
||||
|
||||
VIPS_ARG_INT( class, "page_height", 8,
|
||||
VIPS_ARG_INT( class, "page_height", 102,
|
||||
_( "Page height" ),
|
||||
_( "Set page height for multipage save" ),
|
||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||
|
|
|
@ -382,14 +382,14 @@ vips_foreign_save_png_buffer_init( VipsForeignSavePngBuffer *buffer )
|
|||
*
|
||||
* Optional arguments:
|
||||
*
|
||||
* * @compression: compression level
|
||||
* * @interlace: interlace image
|
||||
* * @profile: ICC profile to embed
|
||||
* * @compression: %gint, compression level
|
||||
* * @interlace: %gboolean, interlace image
|
||||
* * @profile: %gchararray, ICC profile to embed
|
||||
* * @filter: #VipsForeignPngFilter row filter flag(s)
|
||||
* * @palette: enable quantisation to 8bpp palette
|
||||
* * @colours: max number of palette colours for quantisation
|
||||
* * @Q: quality for 8bpp quantisation (does not exceed @colours)
|
||||
* * @dither: amount of dithering for 8bpp quantization
|
||||
* * @palette: %gboolean, enable quantisation to 8bpp palette
|
||||
* * @colours: %gint, max number of palette colours for quantisation
|
||||
* * @Q: %gint, quality for 8bpp quantisation (does not exceed @colours)
|
||||
* * @dither: %gdouble, amount of dithering for 8bpp quantization
|
||||
*
|
||||
* Write a VIPS image to a file as PNG.
|
||||
*
|
||||
|
@ -451,14 +451,14 @@ vips_pngsave( VipsImage *in, const char *filename, ... )
|
|||
*
|
||||
* Optional arguments:
|
||||
*
|
||||
* * @compression: compression level
|
||||
* * @interlace: interlace image
|
||||
* * @profile: ICC profile to embed
|
||||
* * @filter: libpng row filter flag(s)
|
||||
* * @palette: enable quantisation to 8bpp palette
|
||||
* * @colours: max number of palette colours for quantisation
|
||||
* * @Q: quality for 8bpp quantisation (does not exceed @colours)
|
||||
* * @dither: amount of dithering for 8bpp quantization
|
||||
* * @compression: %gint, compression level
|
||||
* * @interlace: %gboolean, interlace image
|
||||
* * @profile: %gchararray, ICC profile to embed
|
||||
* * @filter: #VipsForeignPngFilter row filter flag(s)
|
||||
* * @palette: %gboolean, enable quantisation to 8bpp palette
|
||||
* * @colours: %gint, max number of palette colours for quantisation
|
||||
* * @Q: %gint, quality for 8bpp quantisation (does not exceed @colours)
|
||||
* * @dither: %gdouble, amount of dithering for 8bpp quantization
|
||||
*
|
||||
* As vips_pngsave(), but save to a memory buffer.
|
||||
*
|
||||
|
|
|
@ -469,7 +469,8 @@ vips_foreign_save_tiff_buffer_build( VipsObject *object )
|
|||
}
|
||||
|
||||
static void
|
||||
vips_foreign_save_tiff_buffer_class_init( VipsForeignSaveTiffBufferClass *class )
|
||||
vips_foreign_save_tiff_buffer_class_init(
|
||||
VipsForeignSaveTiffBufferClass *class )
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS( class );
|
||||
VipsObjectClass *object_class = (VipsObjectClass *) class;
|
||||
|
@ -507,23 +508,21 @@ vips_foreign_save_tiff_buffer_init( VipsForeignSaveTiffBuffer *buffer )
|
|||
* * @compression: use this #VipsForeignTiffCompression
|
||||
* * @Q: %gint quality factor
|
||||
* * @predictor: use this #VipsForeignTiffPredictor
|
||||
* * @profile: filename of ICC profile to attach
|
||||
* * @tile: set %TRUE to write a tiled tiff
|
||||
* * @profile: %gchararray, filename of ICC profile to attach
|
||||
* * @tile: %gboolean, set %TRUE to write a tiled tiff
|
||||
* * @tile_width: %gint for tile size
|
||||
* * @tile_height: %gint for tile size
|
||||
* * @pyramid: set %TRUE to write an image pyramid
|
||||
* * @squash: set %TRUE to squash 8-bit images down to 1 bit
|
||||
* * @miniswhite: set %TRUE to write 1-bit images as MINISWHITE
|
||||
* * @pyramid: %gboolean, write an image pyramid
|
||||
* * @squash: %gboolean, squash 8-bit images down to 1 bit
|
||||
* * @miniswhite: %gboolean, write 1-bit images as MINISWHITE
|
||||
* * @resunit: #VipsForeignTiffResunit for resolution unit
|
||||
* * @xres: %gdouble horizontal resolution in pixels/mm
|
||||
* * @yres: %gdouble vertical resolution in pixels/mm
|
||||
* * @bigtiff: set %TRUE to write a BigTiff file
|
||||
* * @properties: set %TRUE to write an IMAGEDESCRIPTION tag
|
||||
* * @strip: set %TRUE to block metadata save
|
||||
* * @page_height: %gint for page height for multi-page save
|
||||
* * @bigtiff: %gboolean, write a BigTiff file
|
||||
* * @properties: %gboolean, set %TRUE to write an IMAGEDESCRIPTION tag
|
||||
* * @region_shrink: #VipsRegionShrink How to shrink each 2x2 region.
|
||||
* * @level: %gint, Zstd compression level
|
||||
* * @lossless: set %TRUE for WebP losssless mode
|
||||
* * @lossless: %gboolean, WebP losssless mode
|
||||
*
|
||||
* Write a VIPS image to a file as TIFF.
|
||||
*
|
||||
|
@ -626,23 +625,21 @@ vips_tiffsave( VipsImage *in, const char *filename, ... )
|
|||
* * @compression: use this #VipsForeignTiffCompression
|
||||
* * @Q: %gint quality factor
|
||||
* * @predictor: use this #VipsForeignTiffPredictor
|
||||
* * @profile: filename of ICC profile to attach
|
||||
* * @tile: set %TRUE to write a tiled tiff
|
||||
* * @profile: %gchararray, filename of ICC profile to attach
|
||||
* * @tile: %gboolean, set %TRUE to write a tiled tiff
|
||||
* * @tile_width: %gint for tile size
|
||||
* * @tile_height: %gint for tile size
|
||||
* * @pyramid: set %TRUE to write an image pyramid
|
||||
* * @squash: set %TRUE to squash 8-bit images down to 1 bit
|
||||
* * @miniswhite: set %TRUE to write 1-bit images as MINISWHITE
|
||||
* * @pyramid: %gboolean, write an image pyramid
|
||||
* * @squash: %gboolean, squash 8-bit images down to 1 bit
|
||||
* * @miniswhite: %gboolean, write 1-bit images as MINISWHITE
|
||||
* * @resunit: #VipsForeignTiffResunit for resolution unit
|
||||
* * @xres: %gdouble horizontal resolution in pixels/mm
|
||||
* * @yres: %gdouble vertical resolution in pixels/mm
|
||||
* * @bigtiff: set %TRUE to write a BigTiff file
|
||||
* * @properties: set %TRUE to write an IMAGEDESCRIPTION tag
|
||||
* * @strip: set %TRUE to block metadata save
|
||||
* * @page_height: %gint for page height for multi-page save
|
||||
* * @bigtiff: %gboolean, write a BigTiff file
|
||||
* * @properties: %gboolean, set %TRUE to write an IMAGEDESCRIPTION tag
|
||||
* * @region_shrink: #VipsRegionShrink How to shrink each 2x2 region.
|
||||
* * @level: %gint, Zstd compression level
|
||||
* * @lossless: set %TRUE for WebP losssless mode
|
||||
* * @lossless: %gboolean, WebP losssless mode
|
||||
*
|
||||
* As vips_tiffsave(), but save to a memory buffer.
|
||||
*
|
||||
|
|
|
@ -540,6 +540,8 @@ read_header( Read *read, VipsImage *out )
|
|||
VIPS_INTERPRETATION_sRGB,
|
||||
1.0, 1.0 );
|
||||
vips_image_pipelinev( out, VIPS_DEMAND_STYLE_THINSTRIP, NULL );
|
||||
VIPS_SETSTR( out->filename,
|
||||
vips_stream_filename( VIPS_STREAM( read->input ) ) );
|
||||
|
||||
if( !WebPDemuxGetFrame( read->demux, 1, &read->iter ) ) {
|
||||
vips_error( "webp",
|
||||
|
|
|
@ -286,8 +286,6 @@ vips_foreign_load_webp_file_header( VipsForeignLoad *load )
|
|||
}
|
||||
VIPS_UNREF( input );
|
||||
|
||||
VIPS_SETSTR( load->out->filename, file->filename );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
|
|
@ -201,7 +201,8 @@ vips_fill_nearest_grow_seed( VipsFillNearest *nearest, Seed *seed )
|
|||
circle.nearest_pixel = vips_fill_nearest_pixel_clip;
|
||||
|
||||
vips__draw_circle_direct( nearest->distance,
|
||||
seed->x, seed->y, seed->r, vips_fill_nearest_scanline, &circle );
|
||||
seed->x, seed->y, seed->r,
|
||||
vips_fill_nearest_scanline, &circle );
|
||||
|
||||
/* Update the action_mask for this seed. Next time, we can skip any
|
||||
* octants where we failed to act this time.
|
||||
|
|
Loading…
Reference in New Issue