mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 13:46:19 +01:00
Prefer use of vips_interpretation_max_alpha()
This also ensures we handle scRGB correctly, see:
e9c5a31552
This commit is contained in:
committed by
Lovell Fuller
parent
94481a967e
commit
8e17c6f518
@@ -60,7 +60,7 @@ class StatsWorker : public Napi::AsyncWorker {
|
||||
// Image is not opaque when alpha layer is present and contains a non-mamixa value
|
||||
if (image.has_alpha()) {
|
||||
double const minAlpha = static_cast<double>(stats.getpoint(STAT_MIN_INDEX, bands).front());
|
||||
if (minAlpha != sharp::MaximumImageAlpha(image.interpretation())) {
|
||||
if (minAlpha != vips_interpretation_max_alpha(image.interpretation())) {
|
||||
baton->isOpaque = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user