]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authoranthony <anthony@git.imagemagick.org>
Mon, 9 Apr 2012 05:46:25 +0000 (05:46 +0000)
committeranthony <anthony@git.imagemagick.org>
Mon, 9 Apr 2012 05:46:25 +0000 (05:46 +0000)
MagickCore/composite.c
MagickCore/morphology.c
MagickCore/option.c
MagickWand/wandcli.c
config/english.xml
config/francais.xml

index 0804cd9b41c8a37e7ad9048218cdbf4cbd1986a1..889ae893fe530547fb45d8610ed0714b3567d1c3 100644 (file)
 %
 */
 
+/*
+   Composition based on the SVG specification:
+
+   A Composition is defined by...
+      Color Function :  f(Sc,Dc)  where Sc and Dc are the normizalized colors
+      Blending areas :  X = 1     for area of overlap, ie: f(Sc,Dc)
+                        Y = 1     for source preserved
+                        Z = 1     for destination preserved
+
+   Conversion to transparency (then optimized)
+      Dca' = f(Sc, Dc)*Sa*Da + Y*Sca*(1-Da) + Z*Dca*(1-Sa)
+      Da'  = X*Sa*Da + Y*Sa*(1-Da) + Z*Da*(1-Sa)
+
+   Where...
+      Sca = Sc*Sa     normalized Source color divided by Source alpha
+      Dca = Dc*Da     normalized Dest color divided by Dest alpha
+      Dc' = Dca'/Da'  the desired color value for this channel.
+
+   Da' in in the follow formula as 'gamma'  The resulting alpla value.
+
+   Most functions use a blending mode of over (X=1,Y=1,Z=1) this results in
+   the following optimizations...
+      gamma = Sa+Da-Sa*Da;
+      gamma = 1 - QuantiumScale*alpha * QuantiumScale*beta;
+      opacity = QuantiumScale*alpha*beta;  // over blend, optimized 1-Gamma
+
+   The above SVG definitions also definate that Mathematical Composition
+   methods should use a 'Over' blending mode for Alpha Channel.
+   It however was not applied for composition modes of 'Plus', 'Minus',
+   the modulus versions of 'Add' and 'Subtract'.
+
+   Mathematical operator changes to be applied from IM v6.7...
+
+    1) Modulus modes 'Add' and 'Subtract' are obsoleted and renamed
+       'ModulusAdd' and 'ModulusSubtract' for clarity.
+
+    2) All mathematical compositions work as per the SVG specification
+       with regard to blending.  This now includes 'ModulusAdd' and
+       'ModulusSubtract'.
+
+    3) When the special channel flag 'sync' (syncronize channel updates)
+       is turned off (enabled by default) then mathematical compositions are
+       only performed on the channels specified, and are applied
+       independantally of each other.  In other words the mathematics is
+       performed as 'pure' mathematical operations, rather than as image
+       operations.
+*/
 static void CompositeHSB(const Quantum red,const Quantum green,
   const Quantum blue,double *hue,double *saturation,double *brightness)
 {
@@ -523,53 +570,6 @@ MagickExport MagickBooleanType CompositeImage(Image *image,
   ssize_t
     y;
 
-  /*
-     Composition based on the SVG specification:
-
-     A Composition is defined by...
-        Color Function :  f(Sc,Dc)  where Sc and Dc are the normizalized colors
-        Blending areas :  X = 1     for area of overlap, ie: f(Sc,Dc)
-                          Y = 1     for source preserved
-                          Z = 1     for destination preserved
-
-     Conversion to transparency (then optimized)
-        Dca' = f(Sc, Dc)*Sa*Da + Y*Sca*(1-Da) + Z*Dca*(1-Sa)
-        Da'  = X*Sa*Da + Y*Sa*(1-Da) + Z*Da*(1-Sa)
-
-     Where...
-        Sca = Sc*Sa     normalized Source color divided by Source alpha
-        Dca = Dc*Da     normalized Dest color divided by Dest alpha
-        Dc' = Dca'/Da'  the desired color value for this channel.
-
-     Da' in in the follow formula as 'gamma'  The resulting alpla value.
-
-     Most functions use a blending mode of over (X=1,Y=1,Z=1) this results in
-     the following optimizations...
-        gamma = Sa+Da-Sa*Da;
-        gamma = 1 - QuantiumScale*alpha * QuantiumScale*beta;
-        opacity = QuantiumScale*alpha*beta;  // over blend, optimized 1-Gamma
-
-     The above SVG definitions also definate that Mathematical Composition
-     methods should use a 'Over' blending mode for Alpha Channel.
-     It however was not applied for composition modes of 'Plus', 'Minus',
-     the modulus versions of 'Add' and 'Subtract'.
-
-     Mathematical operator changes to be applied from IM v6.7...
-
-      1) Modulus modes 'Add' and 'Subtract' are obsoleted and renamed
-         'ModulusAdd' and 'ModulusSubtract' for clarity.
-
-      2) All mathematical compositions work as per the SVG specification
-         with regard to blending.  This now includes 'ModulusAdd' and
-         'ModulusSubtract'.
-
-      3) When the special channel flag 'sync' (syncronize channel updates)
-         is turned off (enabled by default) then mathematical compositions are
-         only performed on the channels specified, and are applied
-         independantally of each other.  In other words the mathematics is
-         performed as 'pure' mathematical operations, rather than as image
-         operations.
-  */
   assert(image != (Image *) NULL);
   assert(image->signature == MagickSignature);
   if (image->debug != MagickFalse)
@@ -772,7 +772,7 @@ MagickExport MagickBooleanType CompositeImage(Image *image,
         }
       /*
         Blur Image by resampling.
-       FUTURE: this is currently broken, especially for small sigma blurs
+        FUTURE: this is currently broken, especially for small sigma blurs
         This needs to be fixed to use a non-user filter setup that provides
         far more control than currently available.
       */
index 5263e10651f5378c432f55b6c7142064a1dbc840..f105c6104222a7655b3e168a068f2065760d7de8 100644 (file)
@@ -284,9 +284,9 @@ static KernelInfo *ParseKernelArray(const char *kernel_string)
       if ( args.xi  < 0.0 || args.psi < 0.0 )
         return(DestroyKernelInfo(kernel));
       kernel->x = ((flags & XValue)!=0) ? (ssize_t)args.xi
-                                               : (ssize_t) (kernel->width-1)/2;
+                                        : (ssize_t) (kernel->width-1)/2;
       kernel->y = ((flags & YValue)!=0) ? (ssize_t)args.psi
-                                               : (ssize_t) (kernel->height-1)/2;
+                                        : (ssize_t) (kernel->height-1)/2;
       if ( kernel->x >= (ssize_t) kernel->width ||
            kernel->y >= (ssize_t) kernel->height )
         return(DestroyKernelInfo(kernel));
@@ -328,7 +328,7 @@ static KernelInfo *ParseKernelArray(const char *kernel_string)
       GetMagickToken(p,&p,token);
     if (    LocaleCompare("nan",token) == 0
         || LocaleCompare("-",token) == 0 ) {
-      kernel->values[i] = nan; /* do not include this value in kernel */
+      kernel->values[i] = nan; /* this value is not part of neighbourhood */
     }
     else {
       kernel->values[i]=StringToDouble(token,(char **) NULL);
@@ -3463,7 +3463,8 @@ static ssize_t MorphologyPrimitiveDirect(Image *image,
               }
             break;
         case VoronoiMorphology:
-            /* Apply Distance to 'Matte' channel, coping the closest color.
+            /* Apply Distance to 'Matte' channel, while coping the color
+            ** values of the closest pixel.
             **
             ** This is experimental, and realy the 'alpha' component should
             ** be completely separate 'masking' channel so that alpha can
index 19a1e843c04b099293d9190f73ef52307e939aa1..e5b4c617738db6ac509b088ca6c1e5ec48435d41 100644 (file)
@@ -457,7 +457,7 @@ static const OptionInfo
     { "+level-colors", 1L, SimpleOperatorOptionFlag, MagickFalse },
     { "-level-colors", 1L, SimpleOperatorOptionFlag, MagickFalse },
     { "+limit", 0L, DeprecateOptionFlag, MagickTrue },
-    { "-limit", 2L, GlobalOptionFlag | ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
+    { "-limit", 2L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
     { "+linear-stretch", 1L, DeprecateOptionFlag, MagickTrue },
     { "-linear-stretch", 1L, SimpleOperatorOptionFlag, MagickFalse },
     { "+liquid-rescale", 1L, DeprecateOptionFlag, MagickTrue },
@@ -606,6 +606,7 @@ static const OptionInfo
     { "-scenes", 1L, NonMagickOptionFlag, MagickFalse },
     { "+screen", 0L, NonMagickOptionFlag, MagickFalse },
     { "-screen", 1L, NonMagickOptionFlag, MagickFalse },
+    { "-script", 1L, UndefinedOptionFlag, MagickFalse }, /* special handling */
     { "+seed", 0L, GlobalOptionFlag, MagickFalse },
     { "-seed", 1L, GlobalOptionFlag, MagickFalse },
     { "+segment", 1L, DeprecateOptionFlag, MagickTrue },
@@ -825,6 +826,7 @@ static const OptionInfo
     { "Divide", DivideDstCompositeOp, DeprecateOptionFlag, MagickTrue },
     { "Minus", MinusDstCompositeOp, DeprecateOptionFlag, MagickTrue },
     { "Threshold", ThresholdCompositeOp, DeprecateOptionFlag, MagickTrue },
+    { "CopyOpacity", CopyAlphaCompositeOp, UndefinedOptionFlag, MagickTrue },
     { (char *) NULL, UndefinedCompositeOp, UndefinedOptionFlag, MagickFalse }
   },
   CompressOptions[] =
index 9329c33c98053f31cf1381725b62d88f1cd9443c..e6c0259347114ebd03ba1e553fe4c83101b8a44c 100644 (file)
@@ -43,6 +43,7 @@
 */
 #include "MagickWand/studio.h"
 #include "MagickWand/MagickWand.h"
+#include "MagickWand/wand.h"
 #include "MagickWand/magick-wand-private.h"
 #include "MagickWand/wandcli.h"
 #include "MagickWand/wandcli-private.h"
index 79aab307d133ec5bea9def93beb647be51eb8c3d..25a6fb00dc11fa6e6402b26adc455fd2b5771b3e 100644 (file)
         <message name="ScriptUnbalancedQuotes">
           script token with unbalanced quotes
         </message>
+        <message name="UnableToOpenScript">
+          unable to open script
+        </message>
         <message name="UnrecognizedColormapType">
           unrecognized colormap type
         </message>
index 1d338deaee53798f313e6a2dc6e1719b299bfe19..ae00b5d13ebcd3f254205f098690d5e1fdc4387c 100644 (file)
         <message name="ScriptUnbalancedQuotes">
           de script token avec des citations asymétriques
         </message>
+        <message name="UnableToOpenScript">
+          impossible d'ouvrir le script
+        </message>
         <message name="UnrecognizedColormapType">
           type de table de couleurs non reconnnu
         </message>