diff --git a/coders/psd.c b/coders/psd.c
index da2b0a7..9739045 100644
--- a/coders/psd.c
+++ b/coders/psd.c
@@ -653,12 +653,8 @@
SetIndexPixelComponent(indexes+x,ScaleQuantumToChar(pixel));
else
SetIndexPixelComponent(indexes+x,ScaleQuantumToShort(pixel));
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
if (image->depth == 1)
{
ssize_t
@@ -672,12 +668,8 @@
{
SetIndexPixelComponent(indexes+x,(((unsigned char) pixel) &
(0x01 << (7-bit))) != 0 ? 0 : 255);
- SetRedPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].red);
- SetGreenPixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].green);
- SetBluePixelComponent(q,image->colormap[(ssize_t)
- GetIndexPixelComponent(indexes+x)].blue);
+ SetRGBOPixelComponent(q,image->colormap+
+ GetIndexPixelComponent(indexes+x));
q++;
x++;
}