]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Mon, 6 Aug 2018 13:18:17 +0000 (09:18 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 6 Aug 2018 13:18:17 +0000 (09:18 -0400)
coders/mat.c
configure
configure.ac
version.sh

index 9b71abc2137ea57ffbd5761199c3fb33d990c310..08030b61d7b3e132691d102cfab5aa20cb7141bc 100644 (file)
@@ -178,11 +178,9 @@ typedef enum
 
 static const QuantumType z2qtype[4] = {GrayQuantum, BlueQuantum, GreenQuantum, RedQuantum};
 
-
 static void InsertComplexDoubleRow(Image *image,double *p,int y,double MinVal,
   double MaxVal,ExceptionInfo *exception)
 {
-
   double f;
   int x;
   register Quantum *q;
@@ -198,52 +196,51 @@ static void InsertComplexDoubleRow(Image *image,double *p,int y,double MinVal,
   for (x = 0; x < (ssize_t) image->columns; x++)
   {
     if (*p > 0)
-    {
-      f = (*p / MaxVal) * (QuantumRange-GetPixelRed(image,q));
-      if (f + GetPixelRed(image,q) > QuantumRange)
-        SetPixelRed(image,QuantumRange,q);
-      else
-        SetPixelRed(image,GetPixelRed(image,q)+ClampToQuantum(f),q);
-      f = GetPixelGreen(image,q)-f/2.0;      
-      if (f <= 0.0)
-        {
-          SetPixelGreen(image,0,q);
-          SetPixelBlue(image,0,q);
-        }
-      else
-        {
-          SetPixelBlue(image,ClampToQuantum(f),q);
-          SetPixelGreen(image,ClampToQuantum(f),q);
-        }
-    }
+      {
+        f=(*p/MaxVal)*(QuantumRange-GetPixelRed(image,q));
+        if ((f+GetPixelRed(image,q)) >= QuantumRange)
+          SetPixelRed(image,QuantumRange,q);
+        else
+          SetPixelRed(image,GetPixelRed(image,q)+ClampToQuantum(f),q);
+        f=GetPixelGreen(image,q)-f/2.0;
+        if (f <= 0.0)
+          {
+            SetPixelGreen(image,0,q);
+            SetPixelBlue(image,0,q);
+          }
+        else
+          {
+            SetPixelBlue(image,ClampToQuantum(f),q);
+            SetPixelGreen(image,ClampToQuantum(f),q);
+          }
+      }
     if (*p < 0)
-    {
-      f = (*p / MinVal) * (QuantumRange-GetPixelBlue(image,q));
-      if (f+GetPixelBlue(image,q) > QuantumRange)
-        SetPixelBlue(image,QuantumRange,q);
-      else
-        SetPixelBlue(image,GetPixelBlue(image,q)+ClampToQuantum(f),q);
-      f = GetPixelGreen(image,q)-f/2.0;      
-      if (f <= 0.0)
-        {
-          SetPixelRed(image,0,q);
-          SetPixelGreen(image,0,q);
-        }
-      else
-        {
-          SetPixelRed(image,ClampToQuantum(f),q);
-          SetPixelGreen(image,ClampToQuantum(f),q);
-        }
-    }
+      {
+        f=(*p/MinVal)*(QuantumRange-GetPixelBlue(image,q));
+        if ((f+GetPixelBlue(image,q)) >= QuantumRange)
+          SetPixelBlue(image,QuantumRange,q);
+        else
+          SetPixelBlue(image,GetPixelBlue(image,q)+ClampToQuantum(f),q);
+        f=GetPixelGreen(image,q)-f/2.0;
+        if (f <= 0.0)
+          {
+            SetPixelRed(image,0,q);
+            SetPixelGreen(image,0,q);
+          }
+        else
+          {
+            SetPixelRed(image,ClampToQuantum(f),q);
+            SetPixelGreen(image,ClampToQuantum(f),q);
+          }
+      }
     p++;
-    q+=GetPixelChannels(image);
+    q++;
   }
   if (!SyncAuthenticPixels(image,exception))
     return;
   return;
 }
 
-
 static void InsertComplexFloatRow(Image *image,float *p,int y,double MinVal,
   double MaxVal,ExceptionInfo *exception)
 {
@@ -262,42 +259,45 @@ static void InsertComplexFloatRow(Image *image,float *p,int y,double MinVal,
   for (x = 0; x < (ssize_t) image->columns; x++)
   {
     if (*p > 0)
-    {
-      f = (*p / MaxVal) * (QuantumRange-GetPixelRed(image,q));
-      if (f+GetPixelRed(image,q) > QuantumRange)
-        SetPixelRed(image,QuantumRange,q);
-      else
-        SetPixelRed(image,GetPixelRed(image,q)+(int) f,q);
-      if ((int) f / 2.0 > GetPixelGreen(image,q))
-        {
-          SetPixelGreen(image,0,q);
-          SetPixelBlue(image,0,q);
-        }
-      else
-        {
-          SetPixelBlue(image,GetPixelBlue(image,q)-(int) (f/2.0),q);
-          SetPixelGreen(image,GetPixelBlue(image,q),q);
-        }
-    }
+      {
+        f=(*p/MaxVal)*(QuantumRange-GetPixelRed(image,q));
+        if ((f+GetPixelRed(image,q)) >= QuantumRange)
+          SetPixelRed(image,QuantumRange,q);
+        else
+          SetPixelRed(image,GetPixelRed(image,q)+ClampToQuantum(f),q);
+        f/=2.0;
+        if ((f > 0) && (f < GetPixelGreen(image,q)) &&
+            (f < GetPixelBlue(image,q)))
+          {
+            SetPixelBlue(image,GetPixelBlue(image,q)-ClampToQuantum(f),q);
+            SetPixelGreen(image,GetPixelBlue(image,q),q);
+          }
+        else
+          {
+            SetPixelGreen(image,0,q);
+            SetPixelBlue(image,0,q);
+          }
+      }
     if (*p < 0)
-    {
-      f = (*p / MaxVal) * (QuantumRange - GetPixelBlue(image,q));
-      if (f + GetPixelBlue(image,q) > QuantumRange)
-        SetPixelBlue(image,QuantumRange,q);
-      else
-        SetPixelBlue(image,GetPixelBlue(image,q)+
-          (int) f,q);
-      if ((int) f / 2.0 > GetPixelGreen(image,q))
-        {
-          SetPixelGreen(image,0,q);
-          SetPixelRed(image,0,q);
-        }
-      else
-        {
-          SetPixelRed(image,GetPixelRed(image,q)-(int) (f/2.0),q);
-          SetPixelGreen(image,GetPixelRed(image,q),q);
-        }
-    }
+      {
+        f=(*p/MaxVal)*(QuantumRange-GetPixelBlue(image,q));
+        if ((f > 0) && ((f+GetPixelBlue(image,q)) < QuantumRange))
+          SetPixelBlue(image,GetPixelBlue(image,q)+ClampToQuantum(f),q);
+        else
+          SetPixelBlue(image,QuantumRange,q);
+        f/=2.0;
+        if ((f > 0) && (f < GetPixelGreen(image,q)) &&
+            (f < GetPixelRed(image,q)))
+          {
+            SetPixelRed(image,GetPixelRed(image,q)-ClampToQuantum(f),q);
+            SetPixelGreen(image,GetPixelRed(image,q),q);
+          }
+        else
+          {
+            SetPixelGreen(image,0,q);
+            SetPixelRed(image,0,q);
+          }
+      }
     p++;
     q++;
   }
index 60a95e71f831c8dacf9f4df7f5666511ea4baf24..bac3dc33809247470ca407be96f19ebe380994a8 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.8-9.
+# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.8-10.
 #
 # Report bugs to <https://github.com/ImageMagick/ImageMagick/issues>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='ImageMagick'
 PACKAGE_TARNAME='ImageMagick'
-PACKAGE_VERSION='7.0.8-9'
-PACKAGE_STRING='ImageMagick 7.0.8-9'
+PACKAGE_VERSION='7.0.8-10'
+PACKAGE_STRING='ImageMagick 7.0.8-10'
 PACKAGE_BUGREPORT='https://github.com/ImageMagick/ImageMagick/issues'
 PACKAGE_URL='https://www.imagemagick.org'
 
@@ -1842,7 +1842,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ImageMagick 7.0.8-9 to adapt to many kinds of systems.
+\`configure' configures ImageMagick 7.0.8-10 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1917,7 +1917,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ImageMagick 7.0.8-9:";;
+     short | recursive ) echo "Configuration of ImageMagick 7.0.8-10:";;
    esac
   cat <<\_ACEOF
 
@@ -2204,7 +2204,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ImageMagick configure 7.0.8-9
+ImageMagick configure 7.0.8-10
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3255,7 +3255,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ImageMagick $as_me 7.0.8-9, which was
+It was created by ImageMagick $as_me 7.0.8-10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4241,7 +4241,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ImageMagick'
- VERSION='7.0.8-9'
+ VERSION='7.0.8-10'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4551,11 +4551,11 @@ MAGICK_MINOR_VERSION=0
 
 MAGICK_MICRO_VERSION=8
 
-MAGICK_PATCHLEVEL_VERSION=9
+MAGICK_PATCHLEVEL_VERSION=10
 
-MAGICK_VERSION=7.0.8-9
+MAGICK_VERSION=7.0.8-10
 
-MAGICK_GIT_REVISION=14584:91371be06:20180723
+MAGICK_GIT_REVISION=14619:637c396aa:20180806
 
 
 # Substitute library versioning
@@ -37632,7 +37632,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ImageMagick $as_me 7.0.8-9, which was
+This file was extended by ImageMagick $as_me 7.0.8-10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -37699,7 +37699,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-ImageMagick config.status 7.0.8-9
+ImageMagick config.status 7.0.8-10
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 23779ba462a6e0eb7b759df4e4ce816697b48ffb..560f313130f7c8e39c166cfe5478802660bd4a8c 100644 (file)
@@ -27,7 +27,7 @@ AC_PREREQ(2.69)
 m4_define([magick_major_version], [7])
 m4_define([magick_minor_version], [0])
 m4_define([magick_micro_version], [8])
-m4_define([magick_patchlevel_version], [9])
+m4_define([magick_patchlevel_version], [10])
 m4_define([magick_version],
           [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
 m4_define([magick_git_revision], esyscmd([sh -c "(gitversion.sh .) | awk '{ print \$1 }' | tr -d '\n'"]))
index ab9622bf542a30a11ec2ae72117cc3b69c57518f..b6701ab7855e4b0352465a6e9b3311534f75aa6d 100644 (file)
@@ -19,7 +19,7 @@ PACKAGE_CHANGE_DATE=`awk '/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { print
 PACKAGE_VERSION='7.0.8'
 PACKAGE_PERL_VERSION='7.0.8'
 PACKAGE_LIB_VERSION="0x708"
-PACKAGE_RELEASE="9"
+PACKAGE_RELEASE="10"
 PACKAGE_LIB_VERSION_NUMBER="7,0,8,${PACKAGE_RELEASE}"
 PACKAGE_RELEASE_DATE_RAW=`date +%F`
 PACKAGE_RELEASE_DATE_REPRODUCIBLE="${PACKAGE_CHANGE_DATE}"