Replies: 2 comments
-
Hello @xzrlalala, You can use any of the arithmetic operations to add or cast the black image. For example: if (vips_black(&t1, 100, 100, "bands", 3, NULL) ||
vips_linear1(t1, &t2, 1.0, 255.0, NULL) ||
vips_cast_uchar(t2, &t3, NULL) ||
vips_copy(t3, &t4, "interpretation", VIPS_INTERPRETATION_sRGB, NULL))
error ... The |
Beta Was this translation helpful? Give feedback.
0 replies
-
I meant to add, you can make large images more quickly by making a 1x1 pixel image, then expanding it. This is what https://github.com/libvips/libvips/blob/master/libvips/iofuncs/image.c#L2420-L2459 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi~
I used the vips_black() function to create a image, but can I create white colour image or turn the black image to white colour in C API?
thanks
Beta Was this translation helpful? Give feedback.
All reactions