mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-17 03:06:41 -07:00
commit
6f8b098b47
1 changed files with 6 additions and 0 deletions
6
vips.h
6
vips.h
|
|
@ -283,6 +283,12 @@ vips_is_16bit (VipsInterpretation interpretation) {
|
||||||
|
|
||||||
int
|
int
|
||||||
vips_flatten_background_brigde(VipsImage *in, VipsImage **out, double r, double g, double b) {
|
vips_flatten_background_brigde(VipsImage *in, VipsImage **out, double r, double g, double b) {
|
||||||
|
if (vips_is_16bit(in->Type)) {
|
||||||
|
r = 65535 * r / 255;
|
||||||
|
g = 65535 * g / 255;
|
||||||
|
b = 65535 * b / 255;
|
||||||
|
}
|
||||||
|
|
||||||
double background[3] = {r, g, b};
|
double background[3] = {r, g, b};
|
||||||
VipsArrayDouble *vipsBackground = vips_array_double_new(background, 3);
|
VipsArrayDouble *vipsBackground = vips_array_double_new(background, 3);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue