mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Embed alpha image on non-transparent background #204
This commit is contained in:
@@ -593,7 +593,7 @@ class ResizeWorker : public NanAsyncWorker {
|
||||
}
|
||||
// Create background
|
||||
VipsArrayDouble *background;
|
||||
if (baton->background[3] < 255.0) {
|
||||
if (baton->background[3] < 255.0 || HasAlpha(image)) {
|
||||
background = vips_array_double_newv(
|
||||
4, baton->background[0], baton->background[1], baton->background[2], baton->background[3]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user