Embed alpha image on non-transparent background #204

This commit is contained in:
Lovell Fuller
2015-04-29 20:14:45 +01:00
parent 783826aa26
commit 33782d3c83
2 changed files with 19 additions and 1 deletions

View File

@@ -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]
);