274
274
return( result );
278
* vips_demand_hint_array:
279
* @image: image to set hint for
280
* @hint: hint for this image
281
* @in: array of input images to this operation
283
* Operations can set demand hints, that is, hints to the VIPS IO system about
284
* the type of region geometry this operation works best with. For example,
285
* operations which transform coordinates will usually work best with
286
* %VIPS_DEMAND_STYLE_SMALLTILE, operations which work on local windows of
287
* pixels will like %VIPS_DEMAND_STYLE_FATSTRIP.
289
* VIPS uses the list of input images to build the tree of operations it needs
290
* for the cache invalidation system. You have to call this function, or its
291
* varargs friend vips_demand_hint().
293
* See also: vips_demand_hint(), vips_image_generate().
277
/* We have to have this as a separate entry point so we can support the old
296
vips_demand_hint_array( VipsImage *image, VipsDemandStyle hint, VipsImage **in )
281
vips__demand_hint_array( VipsImage *image,
282
VipsDemandStyle hint, VipsImage **in )
298
284
int i, len, nany;
299
285
VipsDemandStyle set_hint;
358
* @image: image to set hint for
343
* vips_image_pipeline_array:
344
* @image: output image
345
* @hint: demand hint for @image
346
* @in: %NULL-terminated array of input images
348
* Add an image to a pipeline. @image depends on all of the images in @in,
349
* @image prefers to supply pixels according to @hint.
351
* Operations can set demand hints, that is, hints to the VIPS IO system about
352
* the type of region geometry this operation works best with. For example,
353
* operations which transform coordinates will usually work best with
354
* %VIPS_DEMAND_STYLE_SMALLTILE, operations which work on local windows of
355
* pixels will like %VIPS_DEMAND_STYLE_FATSTRIP.
357
* Header fields in @image are set from the fields in @in, with lower-numbered
358
* images in @in taking priority.
359
* For example, if @in[0] and @in[1] both have an item
360
* called "icc-profile", it's the profile attached to @in[0] that will end up
362
* Image history is completely copied from all @in. @image will have the history
363
* of all the input images.
364
* The array of input images can be empty, meaning @image is at the start of a
367
* VIPS uses the list of input images to build the tree of operations it needs
368
* for the cache invalidation system.
370
* See also: vips_image_pipelinev(), vips_image_generate().
372
* Returns: 0 on success, -1 on error.
375
vips_image_pipeline_array( VipsImage *image,
376
VipsDemandStyle hint, VipsImage **in )
378
vips__demand_hint_array( image, hint, in );
381
vips__image_copy_fields_array( image, in ) )
388
* vips_image_pipelinev:
389
* @image: output image of pipeline
359
390
* @hint: hint for this image
360
* @Varargs: %NULL-terminated list of input images to this operation
362
* Build an array and call vips_demand_hint_array().
364
* See also: vips_demand_hint(), vips_image_generate().
391
* @...: %NULL-terminated list of input images
393
* Build an array and call vips_image_pipeline_array().
395
* See also: vips_image_generate().
367
vips_demand_hint( VipsImage *image, VipsDemandStyle hint, ... )
398
vips_image_pipelinev( VipsImage *image, VipsDemandStyle hint, ... )
378
409
if( i == MAX_IMAGES ) {
379
vips_warn( "vips_demand_hint", "%s", _( "too many images" ) );
410
vips_warn( "vips_image_pipeline", "%s", _( "too many images" ) );
381
412
/* Make sure we have a sentinel there.
383
414
ar[i - 1] = NULL;
386
vips_demand_hint_array( image, hint, ar );
417
return( vips_image_pipeline_array( image, hint, ar ) );