]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authoranthony <anthony@git.imagemagick.org>
Mon, 16 Apr 2012 04:07:30 +0000 (04:07 +0000)
committeranthony <anthony@git.imagemagick.org>
Mon, 16 Apr 2012 04:07:30 +0000 (04:07 +0000)
tests/validate-colorspace.sh

index 33edb9a1942f9402397e4f59893e2a724c80b799..db282a1abdec99b04d717103d6e829e8ed63de39 100755 (executable)
@@ -18,7 +18,7 @@
 
 # how to generate a one pixel (average rose) color and output its values
 in="rose: -scale 1x1"    # a one pixel image of the average color.
-out="-format '%[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]' info:-"
+out="-format '%[fx:int(255*r+.5)],%[fx:int(255*g+.5)],%[fx:int(255*b+.5)]' info:-"
 
 # ----------------
 
@@ -36,16 +36,16 @@ printf "$format2" "Too Dark Color"  "$too_dark"  "RGB(rose)->sRGB result"
 echo ''
 
 # Sanity checks
-if [ "X$average" != "X145,89,80" ]; then
-  echo "Sanity Failure: Average expected to be 145,89,80 - ABORTING"
+if [ "X$average" != "X146,89,80" ]; then
+  echo "Sanity Failure: Average expected to be 146,89,80 - ABORTING"
   error=true
 fi
-if [ "X$too_light" != "X72,25,20" ]; then
-  echo "Sanity Failure: Too Light expected to be 72,25,20 - ABORTING"
+if [ "X$too_light" != "X73,26,21" ]; then
+  echo "Sanity Failure: Too Light expected to be 73,26,21 - ABORTING"
   error=true
 fi
-if [ "X$too_dark" != "X199,159,152" ]; then
-  echo "Sanity Failure: Too Dark expected to be 199,159,152 - ABORTING"
+if [ "X$too_dark" != "X199,160,152" ]; then
+  echo "Sanity Failure: Too Dark expected to be 199,160,152 - ABORTING"
   error=true
 fi
 $error && exit 1