mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-13 17:30:28 -07:00
- Adding a Background option when flattening out a transparent PNG
This commit is contained in:
parent
ebb3688b44
commit
e83c80c93c
5 changed files with 42 additions and 0 deletions
9
vips.h
9
vips.h
|
|
@ -226,6 +226,15 @@ vips_webpsave_bridge(VipsImage *in, void **buf, size_t *len, int strip, int qual
|
|||
);
|
||||
}
|
||||
|
||||
int
|
||||
vips_flatten_image(VipsImage *in, VipsImage **out, double background[3]) {
|
||||
VipsArrayDouble *vipsBackground = vips_array_double_new(background, 3);
|
||||
return vips_flatten(in, out,
|
||||
"background", vipsBackground,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
int
|
||||
vips_init_image (void *buf, size_t len, int imageType, VipsImage **out) {
|
||||
int code = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue