From ad046680f7c5ea7a8e9363a446bfa5a01b4d6f6a Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 4 Aug 2016 12:37:48 +0100 Subject: [PATCH] tiny polish to cpp --- cplusplus/VImage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cplusplus/VImage.cpp b/cplusplus/VImage.cpp index 4b8b34f2..92511694 100644 --- a/cplusplus/VImage.cpp +++ b/cplusplus/VImage.cpp @@ -570,7 +570,7 @@ VImage::new_from_image( std::vector pixel ) VImage onepx = VImage::black( 1, 1, VImage::option()->set( "bands", bands() ) ); - onepx = onepx.linear( to_vectorv( 1, 1.0 ), pixel ).cast( format() ); + onepx = (onepx + pixel).cast( format() ); VImage big = onepx.embed( 0, 0, width(), height(), VImage::option()->set( "extend", VIPS_EXTEND_COPY ) );