MagickCore
7.0.9
Convert, Edit, Or Compose Bitmap Images
|
#include "MagickCore/studio.h"
#include "MagickCore/attribute.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/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"
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 double | ConstrainPixelOffset (double x) |
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" |
Referenced by ChopImage().
#define CropImageTag "Crop/Image" |
Referenced by CropImage().
#define ExcerptImageTag "Excerpt/Image" |
Referenced by ExcerptImage().
#define FlipImageTag "Flip/Image" |
Referenced by FlipImage().
#define FlopImageTag "Flop/Image" |
Referenced by FlopImage().
#define RollImageTag "Roll/Image" |
Referenced by RollImage().
#define SpliceImageTag "Splice/Image" |
Referenced by SpliceImage().
#define TransposeImageTag "Transpose/Image" |
Referenced by TransposeImage().
#define TransverseImageTag "Transverse/Image" |
Referenced by TransverseImage().
MagickExport Image* AutoOrientImage | ( | const Image * | image, |
const OrientationType | orientation, | ||
ExceptionInfo * | exception | ||
) |
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 | ||
) |
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), ChopImageTag, CloneImage(), _Image::columns, _Image::debug, DestroyCacheView(), DestroyImage(), _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, 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 | ||
) |
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), AppendImageToList(), ClampToQuantum(), CloneImage(), CMYKColorspace, _Image::columns, _Image::debug, DestroyCacheView(), DirectClass, _Image::filename, GetCacheViewVirtualPixels(), GetImageListLength(), GetMagickModule, GetNextImageInList(), GetPixelChannels(), GetPixelIntensity(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, NewImageList(), QuantumRange, QueueCacheViewAuthenticPixels(), _Image::rows, SetImageColorspace(), SetImageStorageClass(), SetPixelBlack(), SetPixelCyan(), SetPixelMagenta(), SetPixelYellow(), _ExceptionInfo::signature, _Image::signature, SyncCacheViewAuthenticPixels(), and TraceEvent.
|
inlinestatic |
Referenced by PixelRoundOffset().
|
static |
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 | ||
) |
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), _PixelInfo::alpha, _PixelInfo::alpha_trait, _Image::background_color, BackgroundDispose, BlendPixelTrait, CloneImage(), _Image::columns, CropImageTag, _Image::debug, DestroyCacheView(), DestroyImage(), _Image::dispose, _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, NoneDispose, _TokenInfo::offset, 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(), GetEdgeBackgroundFactor(), GetSimilarityMetric(), OptimizeLayerFrames(), ReadImage(), ShaveImage(), and TrimImage().
MagickExport Image* CropImageToTiles | ( | const Image * | image, |
const char * | crop_geometry, | ||
ExceptionInfo * | exception | ||
) |
References AppendImageToList(), AreaValue, AspectValue, ClearMagickException(), CloneImage(), _Image::columns, CropImage(), _Image::debug, _Image::filename, GetMagickModule, _RectangleInfo::height, LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, NewImageList(), _TokenInfo::offset, _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 | ||
) |
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, _Image::debug, DestroyCacheView(), DestroyImage(), ExcerptImageTag, _Image::filename, GetCacheViewAuthenticPixels(), GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, 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 | ||
) |
References CloneImage(), _Image::compose, CompositeImage(), _Image::debug, DestroyImage(), _Image::filename, GetMagickModule, _RectangleInfo::height, LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, SetImageBackgroundColor(), _ExceptionInfo::signature, _Image::signature, TraceEvent, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by CompareImages().
MagickExport Image* FlipImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, _Image::debug, DestroyCacheView(), DestroyImage(), _Image::filename, FlipImageTag, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, 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 | ||
) |
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, _Image::debug, DestroyCacheView(), DestroyImage(), _Image::filename, FlopImageTag, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), 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 |
References ConstrainPixelOffset().
Referenced by CropImageToTiles().
MagickExport Image* RollImage | ( | const Image * | image, |
const ssize_t | x_offset, | ||
const ssize_t | y_offset, | ||
ExceptionInfo * | exception | ||
) |
References CloneImage(), _Image::columns, CopyImageRegion(), _Image::debug, DestroyImage(), _Image::filename, GetMagickModule, LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, _TokenInfo::offset, 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 | ||
) |
References _Image::columns, CropImage(), _Image::debug, _Image::filename, GetMagickModule, _RectangleInfo::height, 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 | ||
) |
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), _PixelInfo::alpha_trait, _Image::alpha_trait, _Image::background_color, CenterGravity, CloneImage(), _Image::colorspace, _Image::columns, _Image::debug, DestroyCacheView(), DestroyImage(), DirectClass, EastGravity, _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelAlpha(), GetPixelBlue(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelGreen(), GetPixelRed(), _Image::gravity, _RectangleInfo::height, 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 | ||
) |
References CloneImage(), _Image::columns, CropImageToTiles(), DestroyImage(), _Image::filter, GetFirstImageInList(), GetMagickModule, _RectangleInfo::height, 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 | ||
) |
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, _Image::debug, DestroyCacheView(), DestroyImage(), _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, 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 | ||
) |
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, _Image::debug, DestroyCacheView(), DestroyImage(), _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), _RectangleInfo::height, 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 | ||
) |
References _PixelInfo::alpha, _PixelInfo::alpha_trait, _Image::background_color, BlendPixelTrait, CloneImage(), CropImage(), _Image::debug, _Image::filename, GetImageBoundingBox(), GetMagickModule, _RectangleInfo::height, LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, _Image::page, SetImageBackgroundColor(), _Image::signature, TraceEvent, TransparentAlpha, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by PolaroidImage().