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;
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)
{
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++;
}
#! /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>.
#
# 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'
# 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]...
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
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.
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 $@
# Define the identity of the package.
PACKAGE='ImageMagick'
- VERSION='7.0.8-9'
+ VERSION='7.0.8-10'
cat >>confdefs.h <<_ACEOF
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
# 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
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\\"