summaryrefslogtreecommitdiff
path: root/coders/mat.c
diff options
context:
space:
mode:
authorCristy <urban-warrior@imagemagick.org>2018-08-05 18:11:18 -0400
committerCristy <urban-warrior@imagemagick.org>2018-08-05 18:11:18 -0400
commita3663c3dc1165c8afe64d1adb014bb03c952d1b0 (patch)
tree594fd33ffd4a9ae75f5283fc17c88cafe1de02cf /coders/mat.c
parent9808090dd6ab819d2590eb7a6098649463d5e0a5 (diff)
downloadImageMagick-a3663c3dc1165c8afe64d1adb014bb03c952d1b0.tar.gz
...
Diffstat (limited to 'coders/mat.c')
-rw-r--r--coders/mat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/coders/mat.c b/coders/mat.c
index b1f4f1aac..9b71abc21 100644
--- a/coders/mat.c
+++ b/coders/mat.c
@@ -203,7 +203,7 @@ static void InsertComplexDoubleRow(Image *image,double *p,int y,double MinVal,
if (f + GetPixelRed(image,q) > QuantumRange)
SetPixelRed(image,QuantumRange,q);
else
- SetPixelRed(image,GetPixelRed(image,q)+(int) f,q);
+ SetPixelRed(image,GetPixelRed(image,q)+ClampToQuantum(f),q);
f = GetPixelGreen(image,q)-f/2.0;
if (f <= 0.0)
{
@@ -212,8 +212,8 @@ static void InsertComplexDoubleRow(Image *image,double *p,int y,double MinVal,
}
else
{
- SetPixelBlue(image,f,q);
- SetPixelGreen(image,f,q);
+ SetPixelBlue(image,ClampToQuantum(f),q);
+ SetPixelGreen(image,ClampToQuantum(f),q);
}
}
if (*p < 0)