MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#include "MagickCore/studio.h"
#include "MagickCore/attribute.h"
#include "MagickCore/artifact.h"
#include "MagickCore/cache.h"
#include "MagickCore/cache-view.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace-private.h"
#include "MagickCore/composite.h"
#include "MagickCore/distort.h"
#include "MagickCore/draw.h"
#include "MagickCore/effect.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/geometry.h"
#include "MagickCore/image.h"
#include "MagickCore/memory_.h"
#include "MagickCore/layer.h"
#include "MagickCore/list.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/profile-private.h"
#include "MagickCore/property.h"
#include "MagickCore/resource_.h"
#include "MagickCore/resize.h"
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/transform.h"
#include "MagickCore/transform-private.h"
Go to the source code of this file.
Macros | |
#define | ChopImageTag "Chop/Image" |
#define | CropImageTag "Crop/Image" |
#define | ExcerptImageTag "Excerpt/Image" |
#define | FlipImageTag "Flip/Image" |
#define | FlopImageTag "Flop/Image" |
#define | RollImageTag "Roll/Image" |
#define | SpliceImageTag "Splice/Image" |
#define | TransposeImageTag "Transpose/Image" |
#define | TransverseImageTag "Transverse/Image" |
Functions | |
MagickExport Image * | AutoOrientImage (const Image *image, const OrientationType orientation, ExceptionInfo *exception) |
MagickExport Image * | ChopImage (const Image *image, const RectangleInfo *chop_info, ExceptionInfo *exception) |
MagickExport Image * | ConsolidateCMYKImages (const Image *images, ExceptionInfo *exception) |
MagickExport Image * | CropImage (const Image *image, const RectangleInfo *geometry, ExceptionInfo *exception) |
static ssize_t | PixelRoundOffset (double x) |
MagickExport Image * | CropImageToTiles (const Image *image, const char *crop_geometry, ExceptionInfo *exception) |
MagickExport Image * | ExcerptImage (const Image *image, const RectangleInfo *geometry, ExceptionInfo *exception) |
MagickExport Image * | ExtentImage (const Image *image, const RectangleInfo *geometry, ExceptionInfo *exception) |
MagickExport Image * | FlipImage (const Image *image, ExceptionInfo *exception) |
MagickExport Image * | FlopImage (const Image *image, ExceptionInfo *exception) |
static MagickBooleanType | CopyImageRegion (Image *destination, const Image *source, const size_t columns, const size_t rows, const ssize_t sx, const ssize_t sy, const ssize_t dx, const ssize_t dy, ExceptionInfo *exception) |
MagickExport Image * | RollImage (const Image *image, const ssize_t x_offset, const ssize_t y_offset, ExceptionInfo *exception) |
MagickExport Image * | ShaveImage (const Image *image, const RectangleInfo *shave_info, ExceptionInfo *exception) |
MagickExport Image * | SpliceImage (const Image *image, const RectangleInfo *geometry, ExceptionInfo *exception) |
MagickPrivate MagickBooleanType | TransformImage (Image **image, const char *crop_geometry, const char *image_geometry, ExceptionInfo *exception) |
MagickExport Image * | TransposeImage (const Image *image, ExceptionInfo *exception) |
MagickExport Image * | TransverseImage (const Image *image, ExceptionInfo *exception) |
MagickExport Image * | TrimImage (const Image *image, ExceptionInfo *exception) |
#define ChopImageTag "Chop/Image" |
#define CropImageTag "Crop/Image" |
#define ExcerptImageTag "Excerpt/Image" |
#define FlipImageTag "Flip/Image" |
#define FlopImageTag "Flop/Image" |
#define RollImageTag "Roll/Image" |
#define SpliceImageTag "Splice/Image" |
#define TransposeImageTag "Transpose/Image" |
#define TransverseImageTag "Transverse/Image" |
MagickExport Image * AutoOrientImage | ( | const Image * | image, |
const OrientationType | orientation, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 102 of file transform.c.
References BottomLeftOrientation, BottomRightOrientation, CloneImage(), FlipImage(), FlopImage(), LeftBottomOrientation, LeftTopOrientation, MagickCoreSignature, MagickTrue, _Image::orientation, RightBottomOrientation, RightTopOrientation, RotateImage(), _ExceptionInfo::signature, _Image::signature, TopLeftOrientation, TopRightOrientation, TransposeImage(), TransverseImage(), and UndefinedOrientation.
MagickExport Image * ChopImage | ( | const Image * | image, |
const RectangleInfo * | chop_info, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 191 of file transform.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), ChopImageTag, CloneImage(), _Image::columns, DestroyCacheView(), DestroyImage(), _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, OptionWarning, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), _Image::rows, SetImageProgress(), SetPixelChannel(), _ExceptionInfo::signature, _Image::signature, SyncCacheViewAuthenticPixels(), ThrowImageException, TraceEvent, _Image::type, UndefinedPixelTrait, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
MagickExport Image * ConsolidateCMYKImages | ( | const Image * | images, |
ExceptionInfo * | exception | ||
) |
Definition at line 417 of file transform.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), AppendImageToList(), ClampToQuantum(), CloneImage(), CMYKColorspace, _Image::columns, DestroyCacheView(), DirectClass, _Image::filename, GetCacheViewVirtualPixels(), GetImageListLength(), GetMagickModule, GetNextImageInList(), GetPixelChannels(), GetPixelIntensity(), IsEventLogging(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, NewImageList(), QuantumRange, QueueCacheViewAuthenticPixels(), _Image::rows, SetImageColorspace(), SetImageStorageClass(), SetPixelBlack(), SetPixelCyan(), SetPixelMagenta(), SetPixelYellow(), _ExceptionInfo::signature, _Image::signature, SyncCacheViewAuthenticPixels(), and TraceEvent.
|
static |
Definition at line 1459 of file transform.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), DestroyCacheView(), GetCacheViewAuthenticPixels(), GetCacheViewVirtualPixels(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), magick_restrict, MagickFalse, MagickTrue, SetPixelChannel(), SyncCacheViewAuthenticPixels(), and UndefinedPixelTrait.
Referenced by RollImage().
MagickExport Image * CropImage | ( | const Image * | image, |
const RectangleInfo * | geometry, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 538 of file transform.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), _PixelInfo::alpha, _PixelInfo::alpha_trait, _Image::background_color, BackgroundDispose, BlendPixelTrait, CloneImage(), _Image::columns, CropImageTag, DestroyCacheView(), DestroyImage(), _Image::dispose, _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, NoneDispose, OptionWarning, _Image::page, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), _Image::rows, SetImageBackgroundColor(), SetImageProgress(), SetPixelChannel(), _ExceptionInfo::signature, _Image::signature, SyncCacheViewAuthenticPixels(), ThrowMagickException(), TraceEvent, TransparentAlpha, _Image::type, UndefinedPixelTrait, _RectangleInfo::width, _OffsetInfo::x, _RectangleInfo::x, _OffsetInfo::y, and _RectangleInfo::y.
Referenced by CompareImagesLayers(), CropImageToTiles(), CropToFitImage(), DeskewImage(), DistortResizeImage(), GetEdgeBackgroundCensus(), GetEdgeBackgroundColor(), GetSimilarityMetric(), OptimizeLayerFrames(), ReadImage(), SaliencyBlendImage(), SeamlessBlendImage(), ShaveImage(), and TrimImage().
MagickExport Image * CropImageToTiles | ( | const Image * | image, |
const char * | crop_geometry, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 783 of file transform.c.
References AppendImageToList(), AreaValue, AspectValue, ClearMagickException(), CloneImage(), _Image::columns, CropImage(), _Image::filename, GetMagickModule, _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, NewImageList(), _Image::page, ParseGravityGeometry(), PixelRoundOffset(), _Image::rows, _Image::signature, TraceEvent, _RectangleInfo::width, _PointInfo::x, _RectangleInfo::x, XValue, _PointInfo::y, _RectangleInfo::y, and YValue.
Referenced by TransformImage().
MagickExport Image * ExcerptImage | ( | const Image * | image, |
const RectangleInfo * | geometry, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 982 of file transform.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, DestroyCacheView(), DestroyImage(), ExcerptImageTag, _Image::filename, GetCacheViewAuthenticPixels(), GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, _Image::progress_monitor, _Image::rows, SetImageProgress(), SetPixelChannel(), _ExceptionInfo::signature, _Image::signature, SyncCacheViewAuthenticPixels(), TraceEvent, _Image::type, UndefinedPixelTrait, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
MagickExport Image * ExtentImage | ( | const Image * | image, |
const RectangleInfo * | geometry, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1122 of file transform.c.
References CloneImage(), _Image::columns, _Image::compose, CompositeImage(), DestroyImage(), _Image::filename, GetMagickModule, _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, _Image::rows, SetImageBackgroundColor(), _ExceptionInfo::signature, _Image::signature, TraceEvent, Update8BIMClipPath(), _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by CompareImages().
MagickExport Image * FlipImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 1183 of file transform.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, DestroyCacheView(), DestroyImage(), _Image::filename, FlipImageTag, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, _Image::page, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), _Image::rows, SetImageProgress(), SetPixelChannel(), _ExceptionInfo::signature, _Image::signature, SyncCacheViewAuthenticPixels(), TraceEvent, _Image::type, UndefinedPixelTrait, and _RectangleInfo::y.
Referenced by AutoOrientImage().
MagickExport Image * FlopImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 1318 of file transform.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, DestroyCacheView(), DestroyImage(), _Image::filename, FlopImageTag, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), IsEventLogging(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, _Image::page, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), _Image::rows, SetImageProgress(), SetPixelChannel(), _ExceptionInfo::signature, _Image::signature, SyncCacheViewAuthenticPixels(), TraceEvent, _Image::type, UndefinedPixelTrait, _RectangleInfo::width, and _RectangleInfo::x.
Referenced by AutoOrientImage(), and PolaroidImage().
|
inlinestatic |
Definition at line 773 of file transform.c.
References CastDoubleToLong().
Referenced by CropImageToTiles().
MagickExport Image * RollImage | ( | const Image * | image, |
const ssize_t | x_offset, | ||
const ssize_t | y_offset, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1535 of file transform.c.
References CloneImage(), _Image::columns, CopyImageRegion(), DestroyImage(), _Image::filename, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, RollImageTag, _Image::rows, SetImageProgress(), _ExceptionInfo::signature, _Image::signature, TraceEvent, _Image::type, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by PreviewImage().
MagickExport Image * ShaveImage | ( | const Image * | image, |
const RectangleInfo * | shave_info, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1628 of file transform.c.
References _Image::columns, CropImage(), _Image::filename, GetMagickModule, _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, OptionWarning, _Image::page, _Image::rows, SetGeometry(), _Image::signature, ThrowImageException, TraceEvent, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
MagickExport Image * SpliceImage | ( | const Image * | image, |
const RectangleInfo * | geometry, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1688 of file transform.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), _Image::alpha_trait, _PixelInfo::alpha_trait, _Image::background_color, CenterGravity, CloneImage(), _Image::colorspace, _Image::columns, DestroyCacheView(), DestroyImage(), DirectClass, EastGravity, _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelAlpha(), GetPixelBlue(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelGreen(), GetPixelRed(), _Image::gravity, _RectangleInfo::height, IsEventLogging(), IsGrayColorspace(), IsPixelInfoGray(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickMin, MagickTrue, NorthEastGravity, NorthGravity, NorthWestGravity, OpaqueAlpha, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), _Image::rows, SetImageAlpha(), SetImageBackgroundColor(), SetImageColorspace(), SetImageProgress(), SetImageStorageClass(), SetPixelAlpha(), SetPixelBlue(), SetPixelChannel(), SetPixelGreen(), SetPixelRed(), _ExceptionInfo::signature, _Image::signature, SouthEastGravity, SouthGravity, SouthWestGravity, SpliceImageTag, sRGBColorspace, SyncCacheViewAuthenticPixels(), TraceEvent, UndefinedGravity, UndefinedPixelTrait, WestGravity, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
MagickPrivate MagickBooleanType TransformImage | ( | Image ** | image, |
const char * | crop_geometry, | ||
const char * | image_geometry, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 2037 of file transform.c.
References CloneImage(), _Image::columns, CropImageToTiles(), DestroyImage(), _Image::filter, GetFirstImageInList(), GetMagickModule, _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, ParseRegionGeometry(), ResizeImage(), _Image::rows, TraceEvent, and _RectangleInfo::width.
Referenced by DrawPrimitive(), RenderPostscript(), and SketchImage().
MagickExport Image * TransposeImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 2115 of file transform.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, DestroyCacheView(), DestroyImage(), _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, _Image::page, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), _Image::rows, SetImageProgress(), SetPixelChannel(), _ExceptionInfo::signature, _Image::signature, Swap, SyncCacheViewAuthenticPixels(), TraceEvent, TransposeImageTag, _Image::type, UndefinedPixelTrait, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by AutoOrientImage().
MagickExport Image * TransverseImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 2253 of file transform.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, DestroyCacheView(), DestroyImage(), _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, _Image::page, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), _Image::rows, SetImageProgress(), SetPixelChannel(), _ExceptionInfo::signature, _Image::signature, Swap, SyncCacheViewAuthenticPixels(), TraceEvent, TransverseImageTag, _Image::type, UndefinedPixelTrait, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by AutoOrientImage().
MagickExport Image * TrimImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 2400 of file transform.c.
References _PixelInfo::alpha, _PixelInfo::alpha_trait, _Image::background_color, BlendPixelTrait, CenterGravity, CloneImage(), _Image::columns, CropImage(), EastGravity, _Image::filename, GetImageArtifact(), GetImageBoundingBox(), GetMagickModule, _Image::gravity, _RectangleInfo::height, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, NorthEastGravity, NorthGravity, NorthWestGravity, _Image::page, ParseAbsoluteGeometry(), _Image::rows, SetImageBackgroundColor(), _Image::signature, SouthEastGravity, SouthGravity, SouthWestGravity, TraceEvent, TransparentAlpha, Update8BIMClipPath(), WestGravity, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by PolaroidImage().