libvips/cplusplus/vips-operators.cpp

3754 lines
83 KiB
C++
Raw Normal View History

// bodies for vips operations
// this file is generated automatically, do not edit!
VImage VImage::CMC2LCh( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "CMC2LCh",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::CMYK2XYZ( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "CMYK2XYZ",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::HSV2sRGB( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "HSV2sRGB",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::LCh2CMC( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "LCh2CMC",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::LCh2Lab( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "LCh2Lab",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::Lab2LCh( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "Lab2LCh",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::Lab2LabQ( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "Lab2LabQ",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::Lab2LabS( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "Lab2LabS",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::Lab2XYZ( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "Lab2XYZ",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::LabQ2Lab( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "LabQ2Lab",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::LabQ2LabS( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "LabQ2LabS",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::LabQ2sRGB( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "LabQ2sRGB",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
2014-10-27 14:41:44 +01:00
VImage VImage::LabS2Lab( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "LabS2Lab",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-11-16 13:19:04 +01:00
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::LabS2LabQ( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "LabS2LabQ",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::XYZ2CMYK( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "XYZ2CMYK",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::XYZ2Lab( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "XYZ2Lab",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-11-16 13:19:04 +01:00
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::XYZ2Yxy( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "XYZ2Yxy",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-11-16 13:19:04 +01:00
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::XYZ2scRGB( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "XYZ2scRGB",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::Yxy2XYZ( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "Yxy2XYZ",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::abs( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "abs",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::add( VImage right, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "add",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "right", right ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::affine( std::vector<double> matrix, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "affine",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "matrix", matrix ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::analyzeload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "analyzeload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::arrayjoin( std::vector<VImage> in, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "arrayjoin",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "in", in ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::autorot( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "autorot",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-10-27 19:17:49 +01:00
set( "out", &out ) );
return( out );
}
double VImage::avg( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
double out;
call( "avg",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-10-27 19:17:49 +01:00
set( "out", &out ) );
return( out );
}
VImage VImage::bandbool( VipsOperationBoolean boolean, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "bandbool",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "boolean", boolean ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::bandfold( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "bandfold",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-10-27 19:17:49 +01:00
set( "out", &out ) );
return( out );
}
VImage VImage::bandjoin( std::vector<VImage> in, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "bandjoin",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "in", in ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::bandjoin_const( std::vector<double> c, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "bandjoin_const",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "c", c ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::bandmean( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "bandmean",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-10-27 19:17:49 +01:00
set( "out", &out ) );
return( out );
}
VImage VImage::bandrank( std::vector<VImage> in, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "bandrank",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "in", in ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::bandunfold( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "bandunfold",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-10-27 19:17:49 +01:00
set( "out", &out ) );
return( out );
}
VImage VImage::black( int width, int height, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "black",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::boolean( VImage right, VipsOperationBoolean boolean, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "boolean",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "right", right )->
set( "boolean", boolean ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::boolean_const( VipsOperationBoolean boolean, std::vector<double> c, VOption *options ) const
2017-10-06 17:39:52 +02:00
{
VImage out;
2017-10-06 17:39:52 +02:00
call( "boolean_const",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "boolean", boolean )->
set( "c", c ) );
2017-10-06 17:39:52 +02:00
return( out );
2017-10-06 17:39:52 +02:00
}
VImage VImage::buildlut( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "buildlut",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::byteswap( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "byteswap",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::cache( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "cache",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::canny( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "canny",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::case_image( std::vector<VImage> cases, VOption *options ) const
{
VImage out;
call( "case",
(options ? options : VImage::option())->
set( "index", *this )->
set( "out", &out )->
set( "cases", cases ) );
return( out );
}
VImage VImage::cast( VipsBandFormat format, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "cast",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "format", format ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::colourspace( VipsInterpretation space, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "colourspace",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "space", space ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::compass( VImage mask, VOption *options ) const
2017-11-26 18:45:04 +01:00
{
VImage out;
call( "compass",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "mask", mask ) );
2017-11-26 18:45:04 +01:00
return( out );
}
VImage VImage::complex( VipsOperationComplex cmplx, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "complex",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "cmplx", cmplx ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::complex2( VImage right, VipsOperationComplex2 cmplx, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "complex2",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "right", right )->
set( "cmplx", cmplx ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::complexform( VImage right, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "complexform",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "right", right ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::complexget( VipsOperationComplexget get, VOption *options ) const
{
VImage out;
call( "complexget",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "get", get ) );
return( out );
}
VImage VImage::composite( std::vector<VImage> in, std::vector<int> mode, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "composite",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "in", in )->
set( "mode", mode ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::composite2( VImage overlay, VipsBlendMode mode, VOption *options ) const
2017-03-01 16:41:26 +01:00
{
VImage out;
call( "composite2",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "base", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "overlay", overlay )->
set( "mode", mode ) );
2017-03-01 16:41:26 +01:00
return( out );
}
VImage VImage::conv( VImage mask, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "conv",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "mask", mask ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::conva( VImage mask, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "conva",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "mask", mask ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::convasep( VImage mask, VOption *options ) const
2015-11-07 21:54:00 +01:00
{
VImage out;
call( "convasep",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "mask", mask ) );
2015-11-07 21:54:00 +01:00
return( out );
}
VImage VImage::convf( VImage mask, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "convf",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "mask", mask ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::convi( VImage mask, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "convi",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "mask", mask ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::convsep( VImage mask, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "convsep",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "mask", mask ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::copy( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "copy",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
double VImage::countlines( VipsDirection direction, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
double nolines;
2014-10-27 19:17:49 +01:00
call( "countlines",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "nolines", &nolines )->
set( "direction", direction ) );
2014-10-27 19:17:49 +01:00
return( nolines );
2014-10-27 19:17:49 +01:00
}
VImage VImage::crop( int left, int top, int width, int height, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "crop",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "input", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "left", left )->
set( "top", top )->
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::csvload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "csvload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
2020-06-18 14:45:14 +02:00
VImage VImage::csvload_source( VSource source, VOption *options )
{
VImage out;
call( "csvload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
void VImage::csvsave( const char *filename, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
call( "csvsave",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
}
2020-06-18 14:45:14 +02:00
void VImage::csvsave_target( VTarget target, VOption *options ) const
{
call( "csvsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
set( "target", target ) );
}
VImage VImage::dE00( VImage right, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "dE00",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "right", right ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::dE76( VImage right, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "dE76",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "right", right ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::dECMC( VImage right, VOption *options ) const
2015-10-06 23:45:37 +02:00
{
VImage out;
call( "dECMC",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
set( "out", &out )->
set( "right", right ) );
2015-10-06 23:45:37 +02:00
return( out );
}
double VImage::deviate( VOption *options ) const
2015-10-06 23:45:37 +02:00
{
double out;
2015-10-06 23:45:37 +02:00
call( "deviate",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2015-10-06 23:45:37 +02:00
return( out );
}
VImage VImage::divide( VImage right, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "divide",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
set( "out", &out )->
set( "right", right ) );
2014-10-27 19:17:49 +01:00
return( out );
}
void VImage::draw_circle( std::vector<double> ink, int cx, int cy, int radius, VOption *options ) const
2015-10-06 23:45:37 +02:00
{
call( "draw_circle",
(options ? options : VImage::option())->
set( "image", *this )->
set( "ink", ink )->
set( "cx", cx )->
set( "cy", cy )->
set( "radius", radius ) );
}
2015-10-06 23:45:37 +02:00
void VImage::draw_flood( std::vector<double> ink, int x, int y, VOption *options ) const
{
call( "draw_flood",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "image", *this )->
set( "ink", ink )->
set( "x", x )->
set( "y", y ) );
}
2015-10-06 23:45:37 +02:00
void VImage::draw_image( VImage sub, int x, int y, VOption *options ) const
{
call( "draw_image",
(options ? options : VImage::option())->
set( "image", *this )->
set( "sub", sub )->
set( "x", x )->
set( "y", y ) );
2015-10-06 23:45:37 +02:00
}
void VImage::draw_line( std::vector<double> ink, int x1, int y1, int x2, int y2, VOption *options ) const
2015-10-06 23:45:37 +02:00
{
call( "draw_line",
(options ? options : VImage::option())->
set( "image", *this )->
set( "ink", ink )->
set( "x1", x1 )->
set( "y1", y1 )->
set( "x2", x2 )->
set( "y2", y2 ) );
}
2015-10-06 23:45:37 +02:00
void VImage::draw_mask( std::vector<double> ink, VImage mask, int x, int y, VOption *options ) const
{
call( "draw_mask",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "image", *this )->
set( "ink", ink )->
set( "mask", mask )->
set( "x", x )->
set( "y", y ) );
}
2015-10-06 23:45:37 +02:00
void VImage::draw_rect( std::vector<double> ink, int left, int top, int width, int height, VOption *options ) const
{
call( "draw_rect",
(options ? options : VImage::option())->
set( "image", *this )->
set( "ink", ink )->
set( "left", left )->
set( "top", top )->
set( "width", width )->
set( "height", height ) );
2015-10-06 23:45:37 +02:00
}
void VImage::draw_smudge( int left, int top, int width, int height, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
call( "draw_smudge",
(options ? options : VImage::option())->
set( "image", *this )->
set( "left", left )->
set( "top", top )->
set( "width", width )->
set( "height", height ) );
}
2014-10-27 19:17:49 +01:00
void VImage::dzsave( const char *filename, VOption *options ) const
{
call( "dzsave",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
}
VipsBlob *VImage::dzsave_buffer( VOption *options ) const
{
VipsBlob *buffer;
call( "dzsave_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
return( buffer );
}
void VImage::dzsave_target( VTarget target, VOption *options ) const
{
call( "dzsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
set( "target", target ) );
}
VImage VImage::embed( int x, int y, int width, int height, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "embed",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "x", x )->
set( "y", y )->
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::extract_area( int left, int top, int width, int height, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "extract_area",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "input", *this )->
set( "out", &out )->
set( "left", left )->
set( "top", top )->
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::extract_band( int band, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "extract_band",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "band", band ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::eye( int width, int height, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "eye",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::falsecolour( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "falsecolour",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-11-16 13:19:04 +01:00
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::fastcor( VImage ref, VOption *options ) const
2015-10-06 23:45:37 +02:00
{
VImage out;
call( "fastcor",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "ref", ref ) );
2015-10-06 23:45:37 +02:00
return( out );
}
VImage VImage::fill_nearest( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "fill_nearest",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-11-16 13:19:04 +01:00
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
int VImage::find_trim( int *top, int *width, int *height, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
int left;
2014-10-27 19:17:49 +01:00
call( "find_trim",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "left", &left )->
set( "top", top )->
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( left );
2014-10-27 19:17:49 +01:00
}
VImage VImage::fitsload( const char *filename, VOption *options )
2017-10-06 17:39:52 +02:00
{
VImage out;
call( "fitsload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2017-10-06 17:39:52 +02:00
return( out );
}
2021-04-21 18:09:34 +02:00
VImage VImage::fitsload_source( VSource source, VOption *options )
{
VImage out;
call( "fitsload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
void VImage::fitssave( const char *filename, VOption *options ) const
{
call( "fitssave",
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
}
VImage VImage::flatten( VOption *options ) const
{
VImage out;
call( "flatten",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
return( out );
}
VImage VImage::flip( VipsDirection direction, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "flip",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "direction", direction ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::float2rad( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "float2rad",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::fractsurf( int width, int height, double fractal_dimension, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "fractsurf",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "fractal_dimension", fractal_dimension ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::freqmult( VImage mask, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "freqmult",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "mask", mask ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::fwfft( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "fwfft",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::gamma( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "gamma",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::gaussblur( double sigma, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "gaussblur",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "sigma", sigma ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::gaussmat( double sigma, double min_ampl, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "gaussmat",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "sigma", sigma )->
set( "min_ampl", min_ampl ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::gaussnoise( int width, int height, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "gaussnoise",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
2014-10-27 19:17:49 +01:00
set( "height", height ) );
return( out );
}
std::vector<double> VImage::getpoint( int x, int y, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
std::vector<double> out_array;
2014-10-27 19:17:49 +01:00
call( "getpoint",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out_array", &out_array )->
set( "x", x )->
set( "y", y ) );
2014-10-27 19:17:49 +01:00
return( out_array );
2014-10-27 19:17:49 +01:00
}
VImage VImage::gifload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "gifload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::gifload_buffer( VipsBlob *buffer, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "gifload_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
2014-10-27 19:17:49 +01:00
return( out );
}
2020-06-18 14:45:14 +02:00
VImage VImage::gifload_source( VSource source, VOption *options )
{
VImage out;
call( "gifload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
void VImage::gifsave( const char *filename, VOption *options ) const
{
call( "gifsave",
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
}
VipsBlob *VImage::gifsave_buffer( VOption *options ) const
{
VipsBlob *buffer;
call( "gifsave_buffer",
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
return( buffer );
}
void VImage::gifsave_target( VTarget target, VOption *options ) const
{
call( "gifsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
set( "target", target ) );
}
VImage VImage::globalbalance( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "globalbalance",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::gravity( VipsCompassDirection direction, int width, int height, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "gravity",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "direction", direction )->
2019-02-01 21:45:12 +01:00
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::grey( int width, int height, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "grey",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::grid( int tile_height, int across, int down, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "grid",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "tile_height", tile_height )->
set( "across", across )->
set( "down", down ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::heifload( const char *filename, VOption *options )
{
VImage out;
call( "heifload",
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
return( out );
}
VImage VImage::heifload_buffer( VipsBlob *buffer, VOption *options )
{
VImage out;
call( "heifload_buffer",
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
return( out );
}
2020-06-18 14:45:14 +02:00
VImage VImage::heifload_source( VSource source, VOption *options )
{
VImage out;
call( "heifload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
void VImage::heifsave( const char *filename, VOption *options ) const
{
call( "heifsave",
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
}
VipsBlob *VImage::heifsave_buffer( VOption *options ) const
{
VipsBlob *buffer;
call( "heifsave_buffer",
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
return( buffer );
}
2020-06-18 14:45:14 +02:00
void VImage::heifsave_target( VTarget target, VOption *options ) const
{
call( "heifsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
set( "target", target ) );
}
VImage VImage::hist_cum( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hist_cum",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
double VImage::hist_entropy( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
double out;
2014-10-27 19:17:49 +01:00
call( "hist_entropy",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::hist_equal( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hist_equal",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::hist_find( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hist_find",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::hist_find_indexed( VImage index, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hist_find_indexed",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "index", index ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::hist_find_ndim( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hist_find_ndim",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-11-16 13:19:04 +01:00
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
bool VImage::hist_ismonotonic( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
bool monotonic;
2014-10-27 19:17:49 +01:00
call( "hist_ismonotonic",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "monotonic", &monotonic ) );
2014-10-27 19:17:49 +01:00
return( monotonic );
2014-10-27 19:17:49 +01:00
}
VImage VImage::hist_local( int width, int height, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hist_local",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::hist_match( VImage ref, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hist_match",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "ref", ref ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::hist_norm( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hist_norm",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::hist_plot( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hist_plot",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::hough_circle( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hough_circle",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::hough_line( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "hough_line",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::icc_export( VOption *options ) const
2016-07-24 15:47:22 +02:00
{
VImage out;
call( "icc_export",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2016-07-24 15:47:22 +02:00
return( out );
}
VImage VImage::icc_import( VOption *options ) const
2016-07-24 15:47:22 +02:00
{
VImage out;
call( "icc_import",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2016-07-24 15:47:22 +02:00
return( out );
}
VImage VImage::icc_transform( const char *output_profile, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "icc_transform",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "output_profile", output_profile ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::identity( VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "identity",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::ifthenelse( VImage in1, VImage in2, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "ifthenelse",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "cond", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "in1", in1 )->
set( "in2", in2 ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::insert( VImage sub, int x, int y, VOption *options ) const
2016-02-08 21:26:22 +01:00
{
VImage out;
call( "insert",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "main", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "sub", sub )->
set( "x", x )->
set( "y", y ) );
2016-02-08 21:26:22 +01:00
return( out );
}
VImage VImage::invert( VOption *options ) const
2016-02-08 21:26:22 +01:00
{
VImage out;
call( "invert",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2016-02-08 21:26:22 +01:00
return( out );
}
VImage VImage::invertlut( VOption *options ) const
{
VImage out;
call( "invertlut",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
return( out );
}
VImage VImage::invfft( VOption *options ) const
{
VImage out;
call( "invfft",
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
return( out );
}
VImage VImage::join( VImage in2, VipsDirection direction, VOption *options ) const
{
VImage out;
call( "join",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in1", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "in2", in2 )->
set( "direction", direction ) );
return( out );
}
2021-04-21 18:09:34 +02:00
VImage VImage::jp2kload( const char *filename, VOption *options )
{
VImage out;
call( "jp2kload",
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
return( out );
}
VImage VImage::jp2kload_buffer( VipsBlob *buffer, VOption *options )
{
VImage out;
call( "jp2kload_buffer",
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
return( out );
}
VImage VImage::jp2kload_source( VSource source, VOption *options )
{
VImage out;
call( "jp2kload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
void VImage::jp2ksave( const char *filename, VOption *options ) const
{
call( "jp2ksave",
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
}
VipsBlob *VImage::jp2ksave_buffer( VOption *options ) const
{
VipsBlob *buffer;
call( "jp2ksave_buffer",
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
return( buffer );
}
void VImage::jp2ksave_target( VTarget target, VOption *options ) const
{
call( "jp2ksave_target",
(options ? options : VImage::option())->
set( "in", *this )->
set( "target", target ) );
}
VImage VImage::jpegload( const char *filename, VOption *options )
2016-02-12 21:04:46 +01:00
{
VImage out;
call( "jpegload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2016-02-12 21:04:46 +01:00
return( out );
}
VImage VImage::jpegload_buffer( VipsBlob *buffer, VOption *options )
2016-02-12 21:04:46 +01:00
{
VImage out;
call( "jpegload_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
2016-02-12 21:04:46 +01:00
return( out );
}
VImage VImage::jpegload_source( VSource source, VOption *options )
{
VImage out;
call( "jpegload_source",
(options ? options : VImage::option())->
set( "out", &out )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "source", source ) );
return( out );
}
void VImage::jpegsave( const char *filename, VOption *options ) const
{
call( "jpegsave",
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
}
VipsBlob *VImage::jpegsave_buffer( VOption *options ) const
{
VipsBlob *buffer;
call( "jpegsave_buffer",
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
return( buffer );
}
void VImage::jpegsave_mime( VOption *options ) const
{
call( "jpegsave_mime",
(options ? options : VImage::option())->
set( "in", *this ) );
}
void VImage::jpegsave_target( VTarget target, VOption *options ) const
{
call( "jpegsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "target", target ) );
}
2021-05-12 11:36:24 +02:00
VImage VImage::jxlload( const char *filename, VOption *options )
{
VImage out;
call( "jxlload",
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
return( out );
}
VImage VImage::jxlload_buffer( VipsBlob *buffer, VOption *options )
{
VImage out;
call( "jxlload_buffer",
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
return( out );
}
VImage VImage::jxlload_source( VSource source, VOption *options )
{
VImage out;
call( "jxlload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
void VImage::jxlsave( const char *filename, VOption *options ) const
{
call( "jxlsave",
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
}
VipsBlob *VImage::jxlsave_buffer( VOption *options ) const
{
VipsBlob *buffer;
call( "jxlsave_buffer",
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
return( buffer );
}
void VImage::jxlsave_target( VTarget target, VOption *options ) const
{
call( "jxlsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
set( "target", target ) );
}
VImage VImage::labelregions( VOption *options ) const
{
VImage mask;
call( "labelregions",
(options ? options : VImage::option())->
set( "in", *this )->
set( "mask", &mask ) );
return( mask );
}
VImage VImage::linear( std::vector<double> a, std::vector<double> b, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "linear",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "a", a )->
set( "b", b ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::linecache( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "linecache",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::logmat( double sigma, double min_ampl, VOption *options )
2016-01-09 16:08:17 +01:00
{
VImage out;
call( "logmat",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "sigma", sigma )->
set( "min_ampl", min_ampl ) );
2016-01-09 16:08:17 +01:00
return( out );
}
VImage VImage::magickload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "magickload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::magickload_buffer( VipsBlob *buffer, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "magickload_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
2014-10-27 19:17:49 +01:00
return( out );
}
void VImage::magicksave( const char *filename, VOption *options ) const
{
call( "magicksave",
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
}
VipsBlob *VImage::magicksave_buffer( VOption *options ) const
{
VipsBlob *buffer;
call( "magicksave_buffer",
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
return( buffer );
}
VImage VImage::mapim( VImage index, VOption *options ) const
2016-01-09 16:08:17 +01:00
{
VImage out;
call( "mapim",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "index", index ) );
2016-01-09 16:08:17 +01:00
return( out );
}
VImage VImage::maplut( VImage lut, VOption *options ) const
2016-01-09 16:08:17 +01:00
{
VImage out;
call( "maplut",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "lut", lut ) );
2016-01-09 16:08:17 +01:00
return( out );
}
VImage VImage::mask_butterworth( int width, int height, double order, double frequency_cutoff, double amplitude_cutoff, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "mask_butterworth",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "order", order )->
set( "frequency_cutoff", frequency_cutoff )->
set( "amplitude_cutoff", amplitude_cutoff ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::mask_butterworth_band( int width, int height, double order, double frequency_cutoff_x, double frequency_cutoff_y, double radius, double amplitude_cutoff, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "mask_butterworth_band",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "order", order )->
set( "frequency_cutoff_x", frequency_cutoff_x )->
set( "frequency_cutoff_y", frequency_cutoff_y )->
set( "radius", radius )->
set( "amplitude_cutoff", amplitude_cutoff ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::mask_butterworth_ring( int width, int height, double order, double frequency_cutoff, double amplitude_cutoff, double ringwidth, VOption *options )
2016-01-09 16:08:17 +01:00
{
VImage out;
call( "mask_butterworth_ring",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "order", order )->
set( "frequency_cutoff", frequency_cutoff )->
set( "amplitude_cutoff", amplitude_cutoff )->
set( "ringwidth", ringwidth ) );
2016-01-09 16:08:17 +01:00
return( out );
}
VImage VImage::mask_fractal( int width, int height, double fractal_dimension, VOption *options )
2016-01-09 16:08:17 +01:00
{
VImage out;
call( "mask_fractal",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "fractal_dimension", fractal_dimension ) );
2016-01-09 16:08:17 +01:00
return( out );
}
VImage VImage::mask_gaussian( int width, int height, double frequency_cutoff, double amplitude_cutoff, VOption *options )
2016-01-09 16:08:17 +01:00
{
VImage out;
call( "mask_gaussian",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "frequency_cutoff", frequency_cutoff )->
set( "amplitude_cutoff", amplitude_cutoff ) );
2016-01-09 16:08:17 +01:00
return( out );
}
VImage VImage::mask_gaussian_band( int width, int height, double frequency_cutoff_x, double frequency_cutoff_y, double radius, double amplitude_cutoff, VOption *options )
2016-01-09 16:08:17 +01:00
{
VImage out;
call( "mask_gaussian_band",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "frequency_cutoff_x", frequency_cutoff_x )->
set( "frequency_cutoff_y", frequency_cutoff_y )->
set( "radius", radius )->
set( "amplitude_cutoff", amplitude_cutoff ) );
2016-01-09 16:08:17 +01:00
return( out );
}
VImage VImage::mask_gaussian_ring( int width, int height, double frequency_cutoff, double amplitude_cutoff, double ringwidth, VOption *options )
2016-01-09 16:08:17 +01:00
{
VImage out;
call( "mask_gaussian_ring",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "frequency_cutoff", frequency_cutoff )->
set( "amplitude_cutoff", amplitude_cutoff )->
set( "ringwidth", ringwidth ) );
2016-01-09 16:08:17 +01:00
return( out );
}
VImage VImage::mask_ideal( int width, int height, double frequency_cutoff, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "mask_ideal",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "frequency_cutoff", frequency_cutoff ) );
2014-10-27 19:17:49 +01:00
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::mask_ideal_band( int width, int height, double frequency_cutoff_x, double frequency_cutoff_y, double radius, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "mask_ideal_band",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "frequency_cutoff_x", frequency_cutoff_x )->
set( "frequency_cutoff_y", frequency_cutoff_y )->
set( "radius", radius ) );
2014-10-27 19:17:49 +01:00
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::mask_ideal_ring( int width, int height, double frequency_cutoff, double ringwidth, VOption *options )
2016-07-24 15:47:22 +02:00
{
VImage out;
2016-07-24 15:47:22 +02:00
call( "mask_ideal_ring",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "frequency_cutoff", frequency_cutoff )->
set( "ringwidth", ringwidth ) );
return( out );
2016-07-24 15:47:22 +02:00
}
VImage VImage::match( VImage sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, VOption *options ) const
2016-07-24 15:47:22 +02:00
{
VImage out;
2016-07-24 15:47:22 +02:00
call( "match",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "ref", *this )->
set( "out", &out )->
set( "sec", sec )->
set( "xr1", xr1 )->
set( "yr1", yr1 )->
set( "xs1", xs1 )->
set( "ys1", ys1 )->
set( "xr2", xr2 )->
set( "yr2", yr2 )->
set( "xs2", xs2 )->
set( "ys2", ys2 ) );
2016-07-24 15:47:22 +02:00
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::math( VipsOperationMath math, VOption *options ) const
2016-11-02 14:51:09 +01:00
{
VImage out;
2016-11-02 14:51:09 +01:00
call( "math",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "math", math ) );
2016-11-02 14:51:09 +01:00
return( out );
2016-11-02 14:51:09 +01:00
}
VImage VImage::math2( VImage right, VipsOperationMath2 math2, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "math2",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
set( "out", &out )->
set( "right", right )->
set( "math2", math2 ) );
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::math2_const( VipsOperationMath2 math2, std::vector<double> c, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "math2_const",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "math2", math2 )->
set( "c", c ) );
2014-10-27 19:17:49 +01:00
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::matload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "matload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
2014-10-27 19:17:49 +01:00
set( "filename", filename ) );
return( out );
2014-10-27 19:17:49 +01:00
}
2020-06-18 14:45:14 +02:00
VImage VImage::matrixinvert( VOption *options ) const
{
VImage out;
call( "matrixinvert",
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
return( out );
}
VImage VImage::matrixload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "matrixload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
2014-10-27 19:17:49 +01:00
}
2020-06-18 14:45:14 +02:00
VImage VImage::matrixload_source( VSource source, VOption *options )
{
VImage out;
call( "matrixload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
void VImage::matrixprint( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
call( "matrixprint",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
2014-10-27 19:17:49 +01:00
set( "in", *this ) );
}
void VImage::matrixsave( const char *filename, VOption *options ) const
2016-01-09 16:08:17 +01:00
{
call( "matrixsave",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2016-01-09 16:08:17 +01:00
set( "filename", filename ) );
}
2020-06-18 14:45:14 +02:00
void VImage::matrixsave_target( VTarget target, VOption *options ) const
{
call( "matrixsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
set( "target", target ) );
}
double VImage::max( VOption *options ) const
2016-01-09 16:08:17 +01:00
{
double out;
2016-01-09 16:08:17 +01:00
call( "max",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2016-01-09 16:08:17 +01:00
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::measure( int h, int v, VOption *options ) const
2016-11-02 14:51:09 +01:00
{
VImage out;
2016-11-02 14:51:09 +01:00
call( "measure",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "h", h )->
set( "v", v ) );
2016-11-02 14:51:09 +01:00
return( out );
2016-11-02 14:51:09 +01:00
}
VImage VImage::merge( VImage sec, VipsDirection direction, int dx, int dy, VOption *options ) const
{
VImage out;
call( "merge",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "ref", *this )->
set( "out", &out )->
set( "sec", sec )->
set( "direction", direction )->
set( "dx", dx )->
set( "dy", dy ) );
return( out );
}
double VImage::min( VOption *options ) const
{
double out;
call( "min",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
return( out );
}
VImage VImage::morph( VImage mask, VipsOperationMorphology morph, VOption *options ) const
2016-01-09 16:08:17 +01:00
{
VImage out;
call( "morph",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "mask", mask )->
set( "morph", morph ) );
return( out );
2016-01-09 16:08:17 +01:00
}
VImage VImage::mosaic( VImage sec, VipsDirection direction, int xref, int yref, int xsec, int ysec, VOption *options ) const
2016-11-02 14:51:09 +01:00
{
VImage out;
call( "mosaic",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "ref", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "sec", sec )->
set( "direction", direction )->
set( "xref", xref )->
set( "yref", yref )->
set( "xsec", xsec )->
set( "ysec", ysec ) );
2016-11-02 14:51:09 +01:00
return( out );
}
VImage VImage::mosaic1( VImage sec, VipsDirection direction, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, VOption *options ) const
2016-11-02 14:51:09 +01:00
{
VImage out;
call( "mosaic1",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "ref", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "sec", sec )->
set( "direction", direction )->
set( "xr1", xr1 )->
set( "yr1", yr1 )->
set( "xs1", xs1 )->
set( "ys1", ys1 )->
set( "xr2", xr2 )->
set( "yr2", yr2 )->
set( "xs2", xs2 )->
set( "ys2", ys2 ) );
2016-11-02 14:51:09 +01:00
return( out );
}
VImage VImage::msb( VOption *options ) const
2017-10-06 17:39:52 +02:00
{
VImage out;
call( "msb",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2017-10-06 17:39:52 +02:00
return( out );
}
VImage VImage::multiply( VImage right, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "multiply",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "right", right ) );
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::niftiload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "niftiload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
2021-04-21 18:09:34 +02:00
VImage VImage::niftiload_source( VSource source, VOption *options )
{
VImage out;
call( "niftiload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
void VImage::niftisave( const char *filename, VOption *options ) const
{
call( "niftisave",
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
}
VImage VImage::openexrload( const char *filename, VOption *options )
2015-11-07 21:54:00 +01:00
{
VImage out;
call( "openexrload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2015-11-07 21:54:00 +01:00
return( out );
}
VImage VImage::openslideload( const char *filename, VOption *options )
2015-11-07 21:54:00 +01:00
{
VImage out;
call( "openslideload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2015-11-07 21:54:00 +01:00
return( out );
}
2021-04-21 18:09:34 +02:00
VImage VImage::openslideload_source( VSource source, VOption *options )
{
VImage out;
call( "openslideload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
VImage VImage::pdfload( const char *filename, VOption *options )
2015-11-07 21:54:00 +01:00
{
VImage out;
call( "pdfload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
return( out );
}
VImage VImage::pdfload_buffer( VipsBlob *buffer, VOption *options )
{
VImage out;
call( "pdfload_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
return( out );
}
2020-06-18 14:45:14 +02:00
VImage VImage::pdfload_source( VSource source, VOption *options )
{
VImage out;
call( "pdfload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
int VImage::percent( double percent, VOption *options ) const
{
int threshold;
call( "percent",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "threshold", &threshold )->
set( "percent", percent ) );
2015-11-07 21:54:00 +01:00
return( threshold );
2015-11-07 21:54:00 +01:00
}
VImage VImage::perlin( int width, int height, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "perlin",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::phasecor( VImage in2, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "phasecor",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "in2", in2 ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::pngload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "pngload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::pngload_buffer( VipsBlob *buffer, VOption *options )
{
VImage out;
call( "pngload_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
return( out );
}
VImage VImage::pngload_source( VSource source, VOption *options )
{
VImage out;
call( "pngload_source",
(options ? options : VImage::option())->
set( "out", &out )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "source", source ) );
return( out );
}
void VImage::pngsave( const char *filename, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
call( "pngsave",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
}
VipsBlob *VImage::pngsave_buffer( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VipsBlob *buffer;
2014-10-27 19:17:49 +01:00
call( "pngsave_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
2014-10-27 19:17:49 +01:00
return( buffer );
2014-10-27 19:17:49 +01:00
}
void VImage::pngsave_target( VTarget target, VOption *options ) const
{
call( "pngsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "target", target ) );
}
VImage VImage::ppmload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "ppmload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
2020-07-05 23:38:08 +02:00
VImage VImage::ppmload_source( VSource source, VOption *options )
{
VImage out;
call( "ppmload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
void VImage::ppmsave( const char *filename, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
call( "ppmsave",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
}
2020-07-05 23:38:08 +02:00
void VImage::ppmsave_target( VTarget target, VOption *options ) const
{
call( "ppmsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
set( "target", target ) );
}
VImage VImage::premultiply( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "premultiply",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-11-16 13:19:04 +01:00
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::profile( VImage *rows, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage columns;
2014-10-27 19:17:49 +01:00
call( "profile",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "columns", &columns )->
set( "rows", rows ) );
2014-10-27 19:17:49 +01:00
return( columns );
2014-10-27 19:17:49 +01:00
}
VipsBlob *VImage::profile_load( const char *name, VOption *options )
2014-10-27 19:17:49 +01:00
{
VipsBlob *profile;
2014-10-27 19:17:49 +01:00
call( "profile_load",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "profile", &profile )->
set( "name", name ) );
2014-10-27 19:17:49 +01:00
return( profile );
2014-10-27 19:17:49 +01:00
}
VImage VImage::project( VImage *rows, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage columns;
2014-10-27 19:17:49 +01:00
call( "project",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "columns", &columns )->
set( "rows", rows ) );
2014-10-27 19:17:49 +01:00
return( columns );
2014-10-27 19:17:49 +01:00
}
VImage VImage::quadratic( VImage coeff, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "quadratic",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "coeff", coeff ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::rad2float( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "rad2float",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-11-16 13:19:04 +01:00
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::radload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "radload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::radload_buffer( VipsBlob *buffer, VOption *options )
{
VImage out;
call( "radload_buffer",
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
return( out );
}
VImage VImage::radload_source( VSource source, VOption *options )
{
VImage out;
call( "radload_source",
(options ? options : VImage::option())->
set( "out", &out )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "source", source ) );
return( out );
}
void VImage::radsave( const char *filename, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
call( "radsave",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
}
VipsBlob *VImage::radsave_buffer( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VipsBlob *buffer;
2014-10-27 19:17:49 +01:00
call( "radsave_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
2014-10-27 19:17:49 +01:00
return( buffer );
2014-10-27 19:17:49 +01:00
}
void VImage::radsave_target( VTarget target, VOption *options ) const
{
call( "radsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "target", target ) );
}
VImage VImage::rank( int width, int height, int index, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "rank",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "width", width )->
set( "height", height )->
set( "index", index ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::rawload( const char *filename, int width, int height, int bands, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "rawload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename )->
set( "width", width )->
set( "height", height )->
set( "bands", bands ) );
2014-10-27 19:17:49 +01:00
return( out );
}
void VImage::rawsave( const char *filename, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
call( "rawsave",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
}
void VImage::rawsave_fd( int fd, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
call( "rawsave_fd",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "fd", fd ) );
2014-10-27 19:17:49 +01:00
}
VImage VImage::recomb( VImage m, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "recomb",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "m", m ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::reduce( double hshrink, double vshrink, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "reduce",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "hshrink", hshrink )->
set( "vshrink", vshrink ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::reduceh( double hshrink, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "reduceh",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "hshrink", hshrink ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::reducev( double vshrink, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "reducev",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "vshrink", vshrink ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::relational( VImage right, VipsOperationRelational relational, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "relational",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
set( "out", &out )->
set( "right", right )->
set( "relational", relational ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::relational_const( VipsOperationRelational relational, std::vector<double> c, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "relational_const",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "relational", relational )->
set( "c", c ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::remainder( VImage right, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "remainder",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
set( "out", &out )->
set( "right", right ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::remainder_const( std::vector<double> c, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "remainder_const",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "c", c ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::replicate( int across, int down, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "replicate",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "across", across )->
set( "down", down ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::resize( double scale, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "resize",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "scale", scale ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::rot( VipsAngle angle, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "rot",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "angle", angle ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::rot45( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "rot45",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::rotate( double angle, VOption *options ) const
2015-10-06 23:45:37 +02:00
{
VImage out;
call( "rotate",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "angle", angle ) );
2015-10-06 23:45:37 +02:00
return( out );
}
VImage VImage::round( VipsOperationRound round, VOption *options ) const
2015-10-06 23:45:37 +02:00
{
VImage out;
call( "round",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "round", round ) );
2015-10-06 23:45:37 +02:00
return( out );
}
VImage VImage::sRGB2HSV( VOption *options ) const
2015-10-06 23:45:37 +02:00
{
VImage out;
call( "sRGB2HSV",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2015-10-06 23:45:37 +02:00
set( "out", &out ) );
return( out );
}
VImage VImage::sRGB2scRGB( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "sRGB2scRGB",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::scRGB2BW( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "scRGB2BW",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::scRGB2XYZ( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "scRGB2XYZ",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::scRGB2sRGB( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "scRGB2sRGB",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-11-16 13:19:04 +01:00
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::scale( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "scale",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::sequential( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "sequential",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-10-27 19:17:49 +01:00
set( "out", &out ) );
return( out );
}
VImage VImage::sharpen( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "sharpen",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2014-10-27 19:17:49 +01:00
set( "out", &out ) );
return( out );
}
VImage VImage::shrink( double hshrink, double vshrink, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "shrink",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "hshrink", hshrink )->
set( "vshrink", vshrink ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::shrinkh( int hshrink, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "shrinkh",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "hshrink", hshrink ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::shrinkv( int vshrink, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "shrinkv",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "vshrink", vshrink ) );
2014-10-27 19:17:49 +01:00
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::sign( VOption *options ) const
2015-10-06 23:45:37 +02:00
{
VImage out;
2015-10-06 23:45:37 +02:00
call( "sign",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2015-10-06 23:45:37 +02:00
set( "out", &out ) );
return( out );
}
VImage VImage::similarity( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "similarity",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::sines( int width, int height, VOption *options )
{
VImage out;
call( "sines",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
return( out );
}
VImage VImage::smartcrop( int width, int height, VOption *options ) const
{
VImage out;
call( "smartcrop",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "input", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
return( out );
}
VImage VImage::sobel( VOption *options ) const
{
VImage out;
call( "sobel",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
return( out );
}
VImage VImage::spcor( VImage ref, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "spcor",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "ref", ref ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::spectrum( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "spectrum",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::stats( VOption *options ) const
{
VImage out;
call( "stats",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
return( out );
}
VImage VImage::stdif( int width, int height, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "stdif",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::subsample( int xfac, int yfac, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "subsample",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "input", *this )->
2019-02-01 21:45:12 +01:00
set( "out", &out )->
set( "xfac", xfac )->
set( "yfac", yfac ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::subtract( VImage right, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "subtract",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "left", *this )->
set( "out", &out )->
set( "right", right ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::sum( std::vector<VImage> in, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "sum",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "in", in ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::svgload( const char *filename, VOption *options )
{
VImage out;
call( "svgload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
return( out );
}
VImage VImage::svgload_buffer( VipsBlob *buffer, VOption *options )
{
VImage out;
call( "svgload_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
return( out );
}
VImage VImage::svgload_source( VSource source, VOption *options )
{
VImage out;
call( "svgload_source",
(options ? options : VImage::option())->
set( "out", &out )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "source", source ) );
return( out );
}
VImage VImage::switch_image( std::vector<VImage> tests, VOption *options )
{
VImage out;
call( "switch",
(options ? options : VImage::option())->
set( "out", &out )->
set( "tests", tests ) );
return( out );
}
void VImage::system( const char *cmd_format, VOption *options )
2014-10-27 19:17:49 +01:00
{
call( "system",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "cmd_format", cmd_format ) );
2014-10-27 19:17:49 +01:00
}
VImage VImage::text( const char *text, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "text",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "text", text ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::thumbnail( const char *filename, int width, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "thumbnail",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename )->
set( "width", width ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::thumbnail_buffer( VipsBlob *buffer, int width, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "thumbnail_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer )->
set( "width", width ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::thumbnail_image( int width, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "thumbnail_image",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out )->
set( "width", width ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::thumbnail_source( VSource source, int width, VOption *options )
{
VImage out;
call( "thumbnail_source",
(options ? options : VImage::option())->
set( "out", &out )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "source", source )->
set( "width", width ) );
return( out );
}
VImage VImage::tiffload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "tiffload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::tiffload_buffer( VipsBlob *buffer, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "tiffload_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::tiffload_source( VSource source, VOption *options )
{
VImage out;
call( "tiffload_source",
(options ? options : VImage::option())->
set( "out", &out )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "source", source ) );
return( out );
}
void VImage::tiffsave( const char *filename, VOption *options ) const
2014-10-27 19:17:49 +01:00
{
call( "tiffsave",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
}
VipsBlob *VImage::tiffsave_buffer( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VipsBlob *buffer;
2014-10-27 19:17:49 +01:00
call( "tiffsave_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
2014-10-27 19:17:49 +01:00
return( buffer );
2014-10-27 19:17:49 +01:00
}
void VImage::tiffsave_target( VTarget target, VOption *options ) const
{
call( "tiffsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
set( "target", target ) );
}
VImage VImage::tilecache( VOption *options ) const
2017-11-26 18:45:04 +01:00
{
VImage out;
call( "tilecache",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
2017-11-26 18:45:04 +01:00
set( "out", &out ) );
return( out );
}
VImage VImage::tonelut( VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "tonelut",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::transpose3d( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
2014-10-27 19:17:49 +01:00
call( "transpose3d",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
2014-10-27 19:17:49 +01:00
}
VImage VImage::unpremultiply( VOption *options ) const
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "unpremultiply",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::vipsload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "vipsload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
2021-04-21 18:09:34 +02:00
VImage VImage::vipsload_source( VSource source, VOption *options )
{
VImage out;
call( "vipsload_source",
(options ? options : VImage::option())->
set( "out", &out )->
set( "source", source ) );
return( out );
}
void VImage::vipssave( const char *filename, VOption *options ) const
{
call( "vipssave",
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
}
2021-04-21 18:09:34 +02:00
void VImage::vipssave_target( VTarget target, VOption *options ) const
{
call( "vipssave_target",
(options ? options : VImage::option())->
set( "in", *this )->
set( "target", target ) );
}
VImage VImage::webpload( const char *filename, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "webpload",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "filename", filename ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::webpload_buffer( VipsBlob *buffer, VOption *options )
2014-10-27 19:17:49 +01:00
{
VImage out;
call( "webpload_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "buffer", buffer ) );
2014-10-27 19:17:49 +01:00
return( out );
}
VImage VImage::webpload_source( VSource source, VOption *options )
{
VImage out;
call( "webpload_source",
(options ? options : VImage::option())->
set( "out", &out )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "source", source ) );
return( out );
}
void VImage::webpsave( const char *filename, VOption *options ) const
2014-10-20 12:50:34 +02:00
{
call( "webpsave",
(options ? options : VImage::option())->
set( "in", *this )->
set( "filename", filename ) );
}
2014-10-20 12:50:34 +02:00
VipsBlob *VImage::webpsave_buffer( VOption *options ) const
{
VipsBlob *buffer;
call( "webpsave_buffer",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "buffer", &buffer ) );
2019-02-01 21:45:12 +01:00
return( buffer );
2019-02-01 21:45:12 +01:00
}
void VImage::webpsave_target( VTarget target, VOption *options ) const
{
call( "webpsave_target",
(options ? options : VImage::option())->
set( "in", *this )->
experiment with renaming stream rename as VipsConnection, VipsSource, VipsTarget etc. see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619 renamed with this script: ``` set -e edit() { sed -i -E "$1" rename } for i in $*; do cp $i rename edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g edit s/VIPS_STREAMO/VIPS_TARGET/g edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g edit s/VIPS_STREAMI/VIPS_SOURCE/g edit s/VIPS_STREAM/VIPS_CONNECTION/g edit s/vips_streamou/vips_target_custom/g edit s/vips_streamo/vips_target/g edit s/vips_streamiu/vips_source_custom/g edit s/vips_streami/vips_source/g edit s/vips_stream/vips_connection/g edit s/VipsStreamou/VipsTargetCustom/g edit s/VipsStreamo/VipsTarget/g edit s/VipsStreamiu/VipsSourceCustom/g edit s/VipsStreami/VipsSource/g edit s/VipsStream/VipsConnection/g # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g" edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g" edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g" edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g" edit s/streamou/target_custom/g edit s/streamo/target/g edit s/streamiu/source_custom/g edit s/streami/source/g # various identifiers which also change edit s/is_a_stream/is_a_source/g edit s/find_load_stream/find_load_source/g edit s/find_save_stream/find_save_target/g edit s/new_from_stream/new_from_source/g edit s/write_to_stream/write_to_target/g edit s/vips_thumbnail_stream/vips_thumbnail_source/g # eg. vips_webpload_stream edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g" # eg. vips_webpsave_stream edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g" mv rename $i done ```
2019-12-29 22:40:21 +01:00
set( "target", target ) );
}
VImage VImage::worley( int width, int height, VOption *options )
2019-02-01 21:45:12 +01:00
{
VImage out;
call( "worley",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
2014-10-20 12:50:34 +02:00
2014-10-27 19:17:49 +01:00
return( out );
2014-10-20 12:50:34 +02:00
}
2014-10-27 14:41:44 +01:00
VImage VImage::wrap( VOption *options ) const
2019-02-01 21:45:12 +01:00
{
VImage out;
call( "wrap",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "in", *this )->
set( "out", &out ) );
return( out );
}
VImage VImage::xyz( int width, int height, VOption *options )
2019-02-01 21:45:12 +01:00
{
VImage out;
call( "xyz",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
2019-02-01 21:45:12 +01:00
return( out );
}
VImage VImage::zone( int width, int height, VOption *options )
2019-02-01 21:45:12 +01:00
{
VImage out;
call( "zone",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "out", &out )->
set( "width", width )->
set( "height", height ) );
return( out );
2019-02-01 21:45:12 +01:00
}
VImage VImage::zoom( int xfac, int yfac, VOption *options ) const
2019-02-01 21:45:12 +01:00
{
VImage out;
2019-02-01 21:45:12 +01:00
call( "zoom",
2019-02-01 21:45:12 +01:00
(options ? options : VImage::option())->
set( "input", *this )->
set( "out", &out )->
set( "xfac", xfac )->
set( "yfac", yfac ) );
2019-02-01 21:45:12 +01:00
return( out );
2019-02-01 21:45:12 +01:00
}