diff --git a/coders/dds.c b/coders/dds.c
index fa1e0c7..6e2115d 100644
--- a/coders/dds.c
+++ b/coders/dds.c
@@ -641,8 +641,8 @@
alpha = 17U * (unsigned char) ((a0 >> (4*(4*j+i))) & 0xf);
else
alpha = 17U * (unsigned char) ((a1 >> (4*(4*(j-2)+i))) & 0xf);
- SetOpacityPixelComponent(q,ScaleCharToQuantum((unsigned char)
- (255-alpha)));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ alpha));
q++;
}
}
@@ -745,8 +745,8 @@
alpha = 255;
else
alpha = (((6-alpha_code) * a0 + (alpha_code-1) * a1) / 5);
- SetOpacityPixelComponent(q,ScaleCharToQuantum((unsigned char)
- (255-alpha)));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ alpha));
q++;
}
}
@@ -830,8 +830,8 @@
ReadBlobByte(image)));
SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
- SetOpacityPixelComponent(q,ScaleCharToQuantum((unsigned char)
- (255-ReadBlobByte(image))));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ ReadBlobByte(image)));
q++;
}