MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
composite.c File Reference
Include dependency graph for composite.c:

Go to the source code of this file.

Macros

#define FreeDivergentResources()
 
#define CompositeImageTag   "Composite/Image"
 
#define CompositeImageTag   "Composite/Image"
 
#define TextureImageTag   "Texture/Image"
 

Functions

static ImageBlendConvolveImage (const Image *image, const char *kernel, ExceptionInfo *exception)
 
static ImageBlendMagnitudeImage (const Image *dx_image, const Image *dy_image, ExceptionInfo *exception)
 
static ImageBlendMaxMagnitudeImage (const Image *alpha_image, const Image *beta_image, const Image *dx_image, const Image *dy_image, ExceptionInfo *exception)
 
static ImageBlendSumImage (const Image *alpha_image, const Image *beta_image, const double attenuate, const double sign, ExceptionInfo *exception)
 
static ImageBlendDivergentImage (const Image *alpha_image, const Image *beta_image, ExceptionInfo *exception)
 
static MagickBooleanType BlendMaskAlphaChannel (Image *image, const Image *mask_image, ExceptionInfo *exception)
 
static ImageBlendMeanImage (Image *image, const Image *mask_image, ExceptionInfo *exception)
 
static MagickBooleanType BlendRMSEResidual (const Image *alpha_image, const Image *beta_image, double *residual, ExceptionInfo *exception)
 
static void CompositeHCL (const MagickRealType red, const MagickRealType green, const MagickRealType blue, MagickRealType *hue, MagickRealType *chroma, MagickRealType *luma)
 
static MagickBooleanType CompositeOverImage (Image *image, const Image *source_image, const MagickBooleanType clip_to_self, const ssize_t x_offset, const ssize_t y_offset, ExceptionInfo *exception)
 
static void HCLComposite (const MagickRealType hue, const MagickRealType chroma, const MagickRealType luma, MagickRealType *red, MagickRealType *green, MagickRealType *blue)
 
static MagickBooleanType SaliencyBlendImage (Image *image, const Image *source_image, const ssize_t x_offset, const ssize_t y_offset, const double iterations, const double residual_threshold, const size_t tick, ExceptionInfo *exception)
 
static MagickBooleanType SeamlessBlendImage (Image *image, const Image *source_image, const ssize_t x_offset, const ssize_t y_offset, const double iterations, const double residual_threshold, const size_t tick, ExceptionInfo *exception)
 
MagickExport MagickBooleanType CompositeImage (Image *image, const Image *composite, const CompositeOperator compose, const MagickBooleanType clip_to_self, const ssize_t x_offset, const ssize_t y_offset, ExceptionInfo *exception)
 
MagickExport MagickBooleanType TextureImage (Image *image, const Image *texture, ExceptionInfo *exception)
 

Macro Definition Documentation

◆ CompositeImageTag [1/2]

#define CompositeImageTag   "Composite/Image"

◆ CompositeImageTag [2/2]

#define CompositeImageTag   "Composite/Image"

◆ FreeDivergentResources

#define FreeDivergentResources ( )
Value:
{ \
if (dy_image != (Image *) NULL) \
dy_image=DestroyImage(dy_image); \
if (dx_image != (Image *) NULL) \
dx_image=DestroyImage(dx_image); \
if (magnitude_beta != (Image *) NULL) \
magnitude_beta=DestroyImage(magnitude_beta); \
if (dy_beta != (Image *) NULL) \
dy_beta=DestroyImage(dy_beta); \
if (dx_beta != (Image *) NULL) \
dx_beta=DestroyImage(dx_beta); \
if (magnitude_alpha != (Image *) NULL) \
magnitude_alpha=DestroyImage(magnitude_alpha); \
if (dy_alpha != (Image *) NULL) \
dy_alpha=DestroyImage(dy_alpha); \
if (dx_alpha != (Image *) NULL) \
dx_alpha=DestroyImage(dx_alpha); \
}
MagickExport Image * DestroyImage(Image *image)
Definition: image.c:1181
Definition: image.h:152

◆ TextureImageTag

#define TextureImageTag   "Texture/Image"

Function Documentation

◆ BlendConvolveImage()

static Image * BlendConvolveImage ( const Image image,
const char *  kernel,
ExceptionInfo exception 
)
static

◆ BlendDivergentImage()

static Image * BlendDivergentImage ( const Image alpha_image,
const Image beta_image,
ExceptionInfo exception 
)
static

◆ BlendMagnitudeImage()

◆ BlendMaskAlphaChannel()

◆ BlendMaxMagnitudeImage()

◆ BlendMeanImage()

◆ BlendRMSEResidual()

◆ BlendSumImage()

◆ CompositeHCL()

static void CompositeHCL ( const MagickRealType  red,
const MagickRealType  green,
const MagickRealType  blue,
MagickRealType hue,
MagickRealType chroma,
MagickRealType luma 
)
static

Definition at line 915 of file composite.c.

References MagickMax, MagickMin, and QuantumScale.

Referenced by CompositeImage().

◆ CompositeImage()

MagickExport MagickBooleanType CompositeImage ( Image image,
const Image composite,
const CompositeOperator  compose,
const MagickBooleanType  clip_to_self,
const ssize_t  x_offset,
const ssize_t  y_offset,
ExceptionInfo exception 
)

Definition at line 1525 of file composite.c.

References AcquireAuthenticCacheView(), AcquireResampleFilter(), AcquireVirtualCacheView(), _PixelInfo::alpha, _Image::alpha_trait, AlphaCompositeOp, AlphaPixelChannel, AspectValue, AtopCompositeOp, BlackPixelChannel, BlendCompositeOp, _PixelInfo::blue, BluePixelChannel, BlurCompositeOp, BumpmapCompositeOp, ChangeMaskCompositeOp, ClampPixel(), ClampToQuantum(), ClearCompositeOp, CloneImage(), ColorBurnCompositeOp, ColorDodgeCompositeOp, ColorizeCompositeOp, _Image::colorspace, _Image::columns, CompositeHCL(), CompositeImageTag, CompositeOverImage(), CopyAlphaCompositeOp, CopyBlackCompositeOp, CopyBlueCompositeOp, CopyCompositeOp, CopyCyanCompositeOp, CopyGreenCompositeOp, CopyMagentaCompositeOp, CopyPixelTrait, CopyRedCompositeOp, CopyYellowCompositeOp, DarkenCompositeOp, DarkenIntensityCompositeOp, DegreesToRadians(), DestroyCacheView(), DestroyImage(), DestroyResampleFilter(), DifferenceCompositeOp, DirectClass, DisplaceCompositeOp, DissolveCompositeOp, DistortCompositeOp, DivideDstCompositeOp, DivideSrcCompositeOp, DstAtopCompositeOp, DstCompositeOp, DstInCompositeOp, DstOutCompositeOp, DstOverCompositeOp, ExclusionCompositeOp, _Image::filename, FreezeCompositeOp, GaussianFilter, GetCacheViewAuthenticPixels(), GetCacheViewVirtualPixels(), GetImageArtifact(), GetMagickModule, GetOneVirtualPixel(), GetPixelAlpha(), GetPixelBlack(), GetPixelBlue(), GetPixelChannel(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelGreen(), GetPixelInfo(), GetPixelInfoPixel(), GetPixelIntensity(), GetPixelReadMask(), GetPixelRed(), _PixelInfo::green, GreenPixelChannel, HardLightCompositeOp, HardMixCompositeOp, HCLComposite(), HeightValue, HueCompositeOp, InCompositeOp, IntensityCompositeOp, InterpolateCompositeOp, InterpolatePixelInfo(), IsEventLogging(), IsFuzzyEquivalencePixel(), IsStringTrue(), LightenCompositeOp, LightenIntensityCompositeOp, LinearBurnCompositeOp, LinearDodgeCompositeOp, LinearLightCompositeOp, LogMagickEvent(), LuminizeCompositeOp, magick_restrict, MagickCoreSignature, MagickEpsilon, MagickFalse, MagickMax, MagickMin, MagickPI, MagickTrue, MathematicsCompositeOp, MaxPixelChannels, MinusDstCompositeOp, MinusSrcCompositeOp, ModulateCompositeOp, ModulusAddCompositeOp, ModulusSubtractCompositeOp, MultiplyCompositeOp, NegateCompositeOp, NoCompositeOp, NoValue, OpaqueAlphaChannel, OptionError, OptionWarning, OutCompositeOp, OverCompositeOp, OverlayCompositeOp, ParseGeometry(), PegtopLightCompositeOp, PercentValue, PerceptibleReciprocal(), PinLightCompositeOp, PlusCompositeOp, _Image::progress_monitor, _GeometryInfo::psi, QuantumRange, QuantumScale, QueueCacheViewAuthenticPixels(), _PixelInfo::red, RedPixelChannel, ReflectCompositeOp, ReplaceCompositeOp, ResamplePixelColor(), _GeometryInfo::rho, RMSECompositeOp, RoundToUnity(), _Image::rows, SaliencyBlendCompositeOp, SaliencyBlendImage(), SaturateCompositeOp, ScaleResampleFilter(), ScreenCompositeOp, SeamlessBlendCompositeOp, SeamlessBlendImage(), SetGeometryInfo(), SetImageAlphaChannel(), SetImageColorspace(), SetImageProgress(), SetImageStorageClass(), SetPixelAlpha(), SetPixelChannel(), SetPixelViaPixelInfo(), SetResampleFilter(), _GeometryInfo::sigma, SigmaValue, _Image::signature, SoftBurnCompositeOp, SoftDodgeCompositeOp, SoftLightCompositeOp, SrcAtopCompositeOp, SrcCompositeOp, SrcInCompositeOp, SrcOutCompositeOp, SrcOverCompositeOp, StampCompositeOp, StereoCompositeOp, SyncCacheViewAuthenticPixels(), ThresholdCompositeOp, ThrowMagickException(), TraceEvent, TransparentAlpha, UndefinedInterpolatePixel, UndefinedPixelTrait, UpdatePixelTrait, VividLightCompositeOp, WidthValue, _PointInfo::x, _SegmentInfo::x1, _SegmentInfo::x2, _GeometryInfo::xi, XiValue, XorCompositeOp, XValue, _PointInfo::y, _SegmentInfo::y1, _SegmentInfo::y2, and YValue.

Referenced by CoalesceImages(), CompareImages(), CompareImagesLayers(), CompositeCanvas(), DisposeImages(), DistortResizeImage(), DrawPrimitive(), ExtentImage(), FrameImage(), MergeImageLayers(), MontageImageList(), MorphologyApply(), OptimizeImageTransparency(), PolaroidImage(), RenderPostscript(), SetImageAlphaChannel(), SketchImage(), SmushImages(), TextureImage(), and VignetteImage().

◆ CompositeOverImage()

◆ HCLComposite()

static void HCLComposite ( const MagickRealType  hue,
const MagickRealType  chroma,
const MagickRealType  luma,
MagickRealType red,
MagickRealType green,
MagickRealType blue 
)
static

Definition at line 1196 of file composite.c.

References QuantumRange.

Referenced by CompositeImage().

◆ SaliencyBlendImage()

static MagickBooleanType SaliencyBlendImage ( Image image,
const Image source_image,
const ssize_t  x_offset,
const ssize_t  y_offset,
const double  iterations,
const double  residual_threshold,
const size_t  tick,
ExceptionInfo exception 
)
static

◆ SeamlessBlendImage()

static MagickBooleanType SeamlessBlendImage ( Image image,
const Image source_image,
const ssize_t  x_offset,
const ssize_t  y_offset,
const double  iterations,
const double  residual_threshold,
const size_t  tick,
ExceptionInfo exception 
)
static

◆ TextureImage()