From 14c90fb315eb3666a4cf6d784cbde74c69c934ec Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Mon, 7 Oct 2019 18:13:37 -0400
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1726

---
 coders/palm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/coders/palm.c b/coders/palm.c
index 4cd5522a4..a3eae1d82 100644
--- a/coders/palm.c
+++ b/coders/palm.c
@@ -908,10 +908,10 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
         {
           for (x=0; x < (ssize_t) image->columns; x++)
           {
-            color16=(unsigned short) ((((31*(size_t) GetPixelRed(p))/
-              (size_t) QuantumRange) << 11) |
-              (((63*(size_t) GetPixelGreen(p))/(size_t) QuantumRange) << 5) |
-              ((31*(size_t) GetPixelBlue(p))/(size_t) QuantumRange));
+            color16=(unsigned short) ((((31*(ssize_t) GetPixelRed(p))/
+              (ssize_t) QuantumRange) << 11) |
+              (((63*(ssize_t) GetPixelGreen(p))/(ssize_t) QuantumRange) << 5) |
+              ((31*(ssize_t) GetPixelBlue(p))/(ssize_t) QuantumRange));
             if (GetPixelOpacity(p) == (Quantum) TransparentOpacity)
               {
                 transpix.red=GetPixelRed(p);
