Alpha compositing: support grey+alpha src and non-alpha dst

This commit is contained in:
Lovell Fuller
2015-06-02 14:34:23 +01:00
parent 36be0453dd
commit 1091be374e
10 changed files with 133 additions and 90 deletions

View File

@@ -417,10 +417,6 @@ If the background contains an alpha value then WebP and PNG format output images
Merge alpha transparency channel, if any, with `background`.
#### Experimental: overlayWith(filename)
**Experimental:** Composite image with transparent overlay. Both input and overlay image must be RGBA and their dimensions must match.
#### rotate([angle])
Rotate the output image by either an explicit angle or auto-orient based on the EXIF `Orientation` tag.
@@ -498,6 +494,14 @@ The output image will still be web-friendly sRGB and contain three (identical) c
Enhance output image contrast by stretching its luminance to cover the full dynamic range. This typically reduces performance by 30%.
#### overlayWith(filename)
_Experimental_
Alpha composite `filename` over the processed (resized, extracted) image. The dimensions of the two images must match.
* `filename` is a String containing the filename of an image with an alpha channel.
### Output options
#### jpeg()