mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 13:46:19 +01:00
USAGE: overlayWith('overlayimage.png', { cutout: true } )
This commit is contained in:
committed by
Lovell Fuller
parent
f1ead06645
commit
2e9cd83ed2
@@ -277,4 +277,17 @@ namespace sharp {
|
||||
return std::make_tuple(left, top);
|
||||
}
|
||||
|
||||
/*
|
||||
Return the image alpha maximum. Useful for combining alpha bands. scRGB
|
||||
images are 0 - 1 for image data, but the alpha is 0 - 255.
|
||||
*/
|
||||
int MaximumImageAlpha(VipsInterpretation interpretation) {
|
||||
if(interpretation == VIPS_INTERPRETATION_RGB16 ||
|
||||
interpretation == VIPS_INTERPRETATION_GREY16) {
|
||||
return (65535);
|
||||
} else {
|
||||
return (255);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace sharp
|
||||
|
||||
Reference in New Issue
Block a user