fix LUMINANCE_ALPHA

This commit is contained in:
mike-000
2022-08-12 14:48:03 +01:00
parent 435e0bb9e8
commit e6b4b08cac
3 changed files with 60 additions and 1 deletions

View File

@@ -503,7 +503,7 @@ Operators['band'] = {
for (let i = 0; i < bandCount; i++) {
const colorIndex = Math.floor(i / 4);
let bandIndex = i % 4;
if (bandIndex === bandCount - 1 && bandIndex === 1) {
if (i === bandCount - 1 && bandIndex === 1) {
// LUMINANCE_ALPHA - band 1 assigned to rgb and band 2 assigned to alpha
bandIndex = 3;
}