MagickCore
7.0.0
|
#include "MagickCore/studio.h"
#include "MagickCore/artifact.h"
#include "MagickCore/attribute.h"
#include "MagickCore/blob-private.h"
#include "MagickCore/cache-private.h"
#include "MagickCore/channel.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace-private.h"
#include "MagickCore/composite.h"
#include "MagickCore/composite-private.h"
#include "MagickCore/decorate.h"
#include "MagickCore/distort.h"
#include "MagickCore/draw.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/gem.h"
#include "MagickCore/geometry.h"
#include "MagickCore/image.h"
#include "MagickCore/image-private.h"
#include "MagickCore/memory_.h"
#include "MagickCore/list.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/nt-base-private.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/quantum.h"
#include "MagickCore/resource_.h"
#include "MagickCore/shear.h"
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/threshold.h"
#include "MagickCore/transform.h"
Go to the source code of this file.
Data Structures | |
struct | _RadonInfo |
Macros | |
#define | RotateImageTag "Rotate/Image" |
#define | XShearImageTag "XShear/Image" |
#define | YShearImageTag "YShear/Image" |
Typedefs | |
typedef struct _RadonInfo | RadonInfo |
Functions | |
static MagickBooleanType | CropToFitImage (Image **image, const double x_shear, const double y_shear, const double width, const double height, const MagickBooleanType rotate, ExceptionInfo *exception) |
static RadonInfo * | DestroyRadonInfo (RadonInfo *radon_info) |
static MagickBooleanType | ResetRadonCells (RadonInfo *radon_info) |
static RadonInfo * | AcquireRadonInfo (const Image *image, const size_t width, const size_t height, ExceptionInfo *exception) |
static size_t | MagickMin (const size_t x, const size_t y) |
static ssize_t | ReadRadonCell (const RadonInfo *radon_info, const MagickOffsetType offset, const size_t length, unsigned char *buffer) |
static ssize_t | WriteRadonCell (const RadonInfo *radon_info, const MagickOffsetType offset, const size_t length, const unsigned char *buffer) |
static unsigned short | GetRadonCell (const RadonInfo *radon_info, const ssize_t x, const ssize_t y) |
static MagickBooleanType | SetRadonCell (const RadonInfo *radon_info, const ssize_t x, const ssize_t y, const unsigned short value) |
static void | RadonProjection (const Image *image, RadonInfo *source_cells, RadonInfo *destination_cells, const ssize_t sign, size_t *projection) |
static MagickBooleanType | RadonTransform (const Image *image, const double threshold, size_t *projection, ExceptionInfo *exception) |
static void | GetImageBackgroundColor (Image *image, const ssize_t offset, ExceptionInfo *exception) |
MagickExport Image * | DeskewImage (const Image *image, const double threshold, ExceptionInfo *exception) |
MagickExport Image * | IntegralRotateImage (const Image *image, size_t rotations, ExceptionInfo *exception) |
static MagickBooleanType | XShearImage (Image *image, const double degrees, const size_t width, const size_t height, const ssize_t x_offset, const ssize_t y_offset, ExceptionInfo *exception) |
static MagickBooleanType | YShearImage (Image *image, const double degrees, const size_t width, const size_t height, const ssize_t x_offset, const ssize_t y_offset, ExceptionInfo *exception) |
MagickExport Image * | ShearImage (const Image *image, const double x_shear, const double y_shear, ExceptionInfo *exception) |
MagickExport Image * | ShearRotateImage (const Image *image, const double degrees, ExceptionInfo *exception) |
#define RotateImageTag "Rotate/Image" |
Referenced by IntegralRotateImage().
#define XShearImageTag "XShear/Image" |
Referenced by XShearImage().
#define YShearImageTag "YShear/Image" |
Referenced by YShearImage().
typedef struct _RadonInfo RadonInfo |
|
static |
Definition at line 314 of file shear.c.
References AcquireMagickMemory(), AcquireMagickResource(), AcquireUniqueFileResource(), AreaResource, CacheError, _RadonInfo::cells, DestroyRadonInfo(), DiskCache, DiskResource, _RadonInfo::file, _Image::filename, GetMagickModule, _RadonInfo::height, IOMode, _RadonInfo::length, MagickFalse, MagickTrue, MapBlob(), MapCache, _RadonInfo::mapped, MapResource, MemoryCache, MemoryResource, _RadonInfo::path, RelinquishMagickResource(), ResetMagickMemory(), ResetRadonCells(), ThrowMagickException(), _RadonInfo::type, and _RadonInfo::width.
Referenced by RadonTransform().
|
static |
Definition at line 112 of file shear.c.
References CropImage(), DestroyImage(), _RectangleInfo::height, MagickFalse, MagickTrue, _Image::page, ParseAbsoluteGeometry(), _RectangleInfo::width, _PointInfo::x, _RectangleInfo::x, _PointInfo::y, and _RectangleInfo::y.
Referenced by ShearImage(), and ShearRotateImage().
MagickExport Image* DeskewImage | ( | const Image * | image, |
const double | threshold, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 832 of file shear.c.
References AcquireQuantumMemory(), AffineTransformImage(), BackgroundVirtualPixelMethod, CloneImage(), _Image::columns, CropImage(), _Image::debug, DegreesToRadians(), DestroyImage(), FormatLocaleString(), GetImageArtifact(), GetImageBackgroundColor(), GetImageBoundingBox(), GetMagickModule, _RectangleInfo::height, LogMagickEvent(), MagickFalse, MagickTrue, MaxTextExtent, MedianStatistic, RadiansToDegrees(), RadonTransform(), RelinquishMagickMemory(), ResourceLimitError, _AffineMatrix::rx, _AffineMatrix::ry, SetImageArtifact(), SetImageVirtualPixelMethod(), StatisticImage(), StringToLong(), _AffineMatrix::sx, _AffineMatrix::sy, ThrowImageException, TransformEvent, _AffineMatrix::tx, _AffineMatrix::ty, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Definition at line 245 of file shear.c.
References _RadonInfo::cells, DiskCache, DiskResource, _RadonInfo::file, _RadonInfo::length, MagickFalse, MapCache, _RadonInfo::mapped, MapResource, MemoryCache, MemoryResource, _RadonInfo::path, RelinquishMagickMemory(), RelinquishMagickResource(), RelinquishUniqueFileResource(), _RadonInfo::type, and UnmapBlob().
Referenced by AcquireRadonInfo(), and RadonTransform().
|
static |
Definition at line 771 of file shear.c.
References AcquireVirtualCacheView(), _PixelInfo::alpha, _Image::background_color, _PixelInfo::blue, ClampToQuantum(), _Image::columns, DestroyCacheView(), GetCacheViewVirtualPixels(), GetPixelAlpha(), GetPixelAlphaTraits(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelInfo(), GetPixelRed(), _PixelInfo::green, QuantumRange, QuantumScale, _PixelInfo::red, _Image::rows, and UpdatePixelTrait.
Referenced by DeskewImage().
|
inlinestatic |
Definition at line 478 of file shear.c.
References _RadonInfo::cells, DiskCache, _RadonInfo::height, _RadonInfo::length, ReadRadonCell(), and _RadonInfo::type.
Referenced by RadonProjection().
MagickExport Image* IntegralRotateImage | ( | const Image * | image, |
size_t | rotations, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 977 of file shear.c.
References AcquireAuthenticCacheView(), AcquireVirtualCacheView(), CloneImage(), _Image::columns, DestroyCacheView(), DestroyImage(), GetCacheViewVirtualPixels(), GetPixelCacheTileSize(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), _RectangleInfo::height, MagickFalse, MagickTrue, _Image::page, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), RotateImageTag, _Image::rows, SetImageProgress(), SetPixelChannel(), Swap, SyncCacheViewAuthenticPixels(), _Image::type, UndefinedPixelTrait, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by RotateImage(), and ShearRotateImage().
|
inlinestatic |
Definition at line 384 of file shear.c.
Referenced by ReadRadonCell(), and WriteRadonCell().
|
static |
Definition at line 524 of file shear.c.
References GetRadonCell(), _RadonInfo::height, SetRadonCell(), and _RadonInfo::width.
Referenced by RadonTransform().
|
static |
Definition at line 610 of file shear.c.
References AcquireRadonInfo(), AcquireVirtualCacheView(), _Image::columns, DestroyCacheView(), DestroyRadonInfo(), GetCacheViewVirtualPixels(), GetPixelChannels(), GetPixelIntensity(), MagickFalse, MagickTrue, RadonProjection(), ResetRadonCells(), _Image::rows, and SetRadonCell().
Referenced by DeskewImage().
|
inlinestatic |
Definition at line 391 of file shear.c.
References _RadonInfo::file, and MagickMin().
Referenced by GetRadonCell().
|
static |
Definition at line 281 of file shear.c.
References _RadonInfo::cells, DiskCache, _RadonInfo::file, _RadonInfo::height, _RadonInfo::length, MagickFalse, MagickTrue, ResetMagickMemory(), _RadonInfo::type, and _RadonInfo::width.
Referenced by AcquireRadonInfo(), and RadonTransform().
|
inlinestatic |
Definition at line 499 of file shear.c.
References _RadonInfo::cells, DiskCache, _RadonInfo::height, _RadonInfo::length, MagickFalse, MagickTrue, _RadonInfo::type, and WriteRadonCell().
Referenced by RadonProjection(), and RadonTransform().
MagickExport Image* ShearImage | ( | const Image * | image, |
const double | x_shear, | ||
const double | y_shear, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1854 of file shear.c.
References _Image::alpha_trait, _Image::background_color, BlendPixelTrait, _Image::border_color, BorderImage(), CloneImage(), _Image::columns, _Image::compose, CopyCompositeOp, CropToFitImage(), _Image::debug, DegreesToRadians(), DestroyImage(), DirectClass, _Image::filename, GetMagickModule, _RectangleInfo::height, ImageError, LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, OpaqueAlphaChannel, _Image::page, ResourceLimitError, _Image::rows, SetImageAlphaChannel(), SetImageStorageClass(), _ExceptionInfo::signature, _Image::signature, ThrowImageException, TraceEvent, _RectangleInfo::width, _PointInfo::x, XShearImage(), _PointInfo::y, and YShearImage().
Referenced by PreviewImage().
MagickExport Image* ShearRotateImage | ( | const Image * | image, |
const double | degrees, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1991 of file shear.c.
References _Image::alpha_trait, _Image::background_color, BlendPixelTrait, _Image::border_color, BorderImage(), _Image::columns, _Image::compose, CopyCompositeOp, CropToFitImage(), _Image::debug, DegreesToRadians(), DestroyImage(), DirectClass, _Image::filename, GetMagickModule, _RectangleInfo::height, IntegralRotateImage(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, OpaqueAlphaChannel, _Image::page, ResourceLimitError, _Image::rows, SetImageAlphaChannel(), SetImageStorageClass(), _ExceptionInfo::signature, _Image::signature, ThrowImageException, TraceEvent, _RectangleInfo::width, _PointInfo::x, XShearImage(), _PointInfo::y, and YShearImage().
|
inlinestatic |
Definition at line 435 of file shear.c.
References _RadonInfo::file, and MagickMin().
Referenced by SetRadonCell().
|
static |
Definition at line 1417 of file shear.c.
References AcquireAuthenticCacheView(), _PixelInfo::alpha, _Image::background_color, _Image::columns, CompositePixelInfoAreaBlend(), _Image::debug, DestroyCacheView(), _Image::filename, GetCacheViewAuthenticPixels(), GetMagickModule, GetPixelAlpha(), GetPixelChannels(), GetPixelInfo(), GetPixelInfoPixel(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::progress_monitor, SetImageProgress(), SetPixelInfoPixel(), _Image::signature, SyncCacheViewAuthenticPixels(), TraceEvent, and XShearImageTag.
Referenced by ShearImage(), and ShearRotateImage().
|
static |
Definition at line 1633 of file shear.c.
References AcquireAuthenticCacheView(), _PixelInfo::alpha, _Image::background_color, CompositePixelInfoAreaBlend(), _Image::debug, DestroyCacheView(), _Image::filename, GetCacheViewAuthenticPixels(), GetMagickModule, GetPixelAlpha(), GetPixelChannels(), GetPixelInfo(), GetPixelInfoPixel(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::progress_monitor, _Image::rows, SetImageProgress(), SetPixelInfoPixel(), _Image::signature, SyncCacheViewAuthenticPixels(), TraceEvent, and YShearImageTag.
Referenced by ShearImage(), and ShearRotateImage().