%
*/
+/*
+ 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)
{
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)
}
/*
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.
*/
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));
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);
}
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
{ "+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 },
{ "-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 },
{ "Divide", DivideDstCompositeOp, DeprecateOptionFlag, MagickTrue },
{ "Minus", MinusDstCompositeOp, DeprecateOptionFlag, MagickTrue },
{ "Threshold", ThresholdCompositeOp, DeprecateOptionFlag, MagickTrue },
+ { "CopyOpacity", CopyAlphaCompositeOp, UndefinedOptionFlag, MagickTrue },
{ (char *) NULL, UndefinedCompositeOp, UndefinedOptionFlag, MagickFalse }
},
CompressOptions[] =
*/
#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"
<message name="ScriptUnbalancedQuotes">
script token with unbalanced quotes
</message>
+ <message name="UnableToOpenScript">
+ unable to open script
+ </message>
<message name="UnrecognizedColormapType">
unrecognized colormap type
</message>
<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>