#include "magick/studio.h"#include "magick/artifact.h"#include "magick/attribute.h"#include "magick/blob-private.h"#include "magick/cache-private.h"#include "magick/color-private.h"#include "magick/colorspace-private.h"#include "magick/composite.h"#include "magick/composite-private.h"#include "magick/decorate.h"#include "magick/distort.h"#include "magick/draw.h"#include "magick/exception.h"#include "magick/exception-private.h"#include "magick/gem.h"#include "magick/geometry.h"#include "magick/image.h"#include "magick/image-private.h"#include "magick/memory_.h"#include "magick/list.h"#include "magick/monitor.h"#include "magick/monitor-private.h"#include "magick/pixel-private.h"#include "magick/quantum.h"#include "magick/resource_.h"#include "magick/shear.h"#include "magick/statistic.h"#include "magick/threshold.h"#include "magick/transform.h"
Go to the source code of this file.
Data Structures | |
| struct | _RadonInfo |
Defines | |
| #define | RotateImageTag "Rotate/Image" |
| #define | XShearImageTag "XShear/Image" |
| #define | YShearImageTag "YShear/Image" |
Typedefs | |
| typedef struct _RadonInfo | RadonInfo |
Functions | |
| MagickExport Image * | AffineTransformImage (const Image *image, const AffineMatrix *affine_matrix, ExceptionInfo *exception) |
| static void | CropToFitImage (Image **image, const MagickRealType x_shear, const MagickRealType y_shear, const MagickRealType width, const MagickRealType 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 unsigned long width, const unsigned long height, ExceptionInfo *exception) |
| static size_t | MagickMin (const size_t x, const size_t y) |
| static ssize_t | ReadRadonCell (const RadonInfo *radon_info, const off_t offset, const size_t length, unsigned char *buffer) |
| static ssize_t | WriteRadonCell (const RadonInfo *radon_info, const off_t offset, const size_t length, const unsigned char *buffer) |
| static unsigned short | GetRadonCell (const RadonInfo *radon_info, const long x, const long y) |
| static MagickBooleanType | SetRadonCell (const RadonInfo *radon_info, const long x, const long y, const unsigned short value) |
| static void | RadonProjection (RadonInfo *source_cells, RadonInfo *destination_cells, const long sign, unsigned long *projection) |
| static MagickBooleanType | RadonTransform (const Image *image, const double threshold, unsigned long *projection, ExceptionInfo *exception) |
| static void | GetImageBackgroundColor (Image *image, const long offset, ExceptionInfo *exception) |
| MagickExport Image * | DeskewImage (const Image *image, const double threshold, ExceptionInfo *exception) |
| static Image * | IntegralRotateImage (const Image *image, unsigned long rotations, ExceptionInfo *exception) |
| static MagickBooleanType | XShearImage (Image *image, const MagickRealType degrees, const unsigned long width, const unsigned long height, const long x_offset, const long y_offset) |
| static MagickBooleanType | YShearImage (Image *image, const MagickRealType degrees, const unsigned long width, const unsigned long height, const long x_offset, const long y_offset) |
| MagickExport Image * | RotateImage (const Image *image, const double degrees, ExceptionInfo *exception) |
| MagickExport Image * | ShearImage (const Image *image, const double x_shear, const double y_shear, 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 RadonInfo* AcquireRadonInfo | ( | const Image * | image, | |
| const unsigned long | width, | |||
| const unsigned long | height, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 362 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().
| MagickExport Image* AffineTransformImage | ( | const Image * | image, | |
| const AffineMatrix * | affine_matrix, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 107 of file shear.c.
References AffineProjectionDistortion, _Image::debug, DistortImage(), _Image::filename, GetMagickModule, LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _AffineMatrix::rx, _AffineMatrix::ry, _ExceptionInfo::signature, _Image::signature, _AffineMatrix::sx, _AffineMatrix::sy, TraceEvent, _AffineMatrix::tx, and _AffineMatrix::ty.
Referenced by DeskewImage().
| static void CropToFitImage | ( | Image ** | image, | |
| const MagickRealType | x_shear, | |||
| const MagickRealType | y_shear, | |||
| const MagickRealType | width, | |||
| const MagickRealType | height, | |||
| const MagickBooleanType | rotate, | |||
| ExceptionInfo * | exception | |||
| ) | [inline, static] |
Definition at line 166 of file shear.c.
References CropImage(), DestroyImage(), _RectangleInfo::height, MagickFalse, _Image::page, ParseAbsoluteGeometry(), _RectangleInfo::width, _RectangleInfo::x, _PointInfo::x, _RectangleInfo::y, and _PointInfo::y.
Referenced by RotateImage(), and ShearImage().
| MagickExport Image* DeskewImage | ( | const Image * | image, | |
| const double | threshold, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 875 of file shear.c.
References AcquireQuantumMemory(), AffineTransformImage(), BackgroundVirtualPixelMethod, CloneImage(), _Image::columns, CropImage(), _Image::debug, DegreesToRadians(), DestroyImage(), GetImageArtifact(), GetImageBackgroundColor(), GetImageBoundingBox(), GetMagickModule, _RectangleInfo::height, LogMagickEvent(), MagickFalse, MagickTrue, MedianFilterImage(), RadiansToDegrees(), RadonTransform(), RelinquishMagickMemory(), ResourceLimitError, _AffineMatrix::rx, _AffineMatrix::ry, SetImageVirtualPixelMethod(), _AffineMatrix::sx, _AffineMatrix::sy, ThrowImageException, TransformEvent, _AffineMatrix::tx, _AffineMatrix::ty, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Definition at line 291 of file shear.c.
References _RadonInfo::cells, close, 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 void GetImageBackgroundColor | ( | Image * | image, | |
| const long | offset, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 816 of file shear.c.
References AcquireCacheView(), _Image::background_color, _PixelPacket::blue, _MagickPixelPacket::blue, _Image::columns, DestroyCacheView(), GetCacheViewVirtualPixels(), GetMagickPixelPacket(), _PixelPacket::green, _MagickPixelPacket::green, _PixelPacket::opacity, _MagickPixelPacket::opacity, QuantumRange, QuantumScale, _PixelPacket::red, _MagickPixelPacket::red, RoundToQuantum(), and _Image::rows.
Referenced by DeskewImage().
| static unsigned short GetRadonCell | ( | const RadonInfo * | radon_info, | |
| const long | x, | |||
| const long | y | |||
| ) | [inline, static] |
Definition at line 526 of file shear.c.
References _RadonInfo::cells, DiskCache, _RadonInfo::height, _RadonInfo::length, ReadRadonCell(), and _RadonInfo::type.
Referenced by RadonProjection().
| static Image* IntegralRotateImage | ( | const Image * | image, | |
| unsigned long | rotations, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 1010 of file shear.c.
References AcquireCacheView(), CloneImage(), _Image::columns, DestroyCacheView(), DestroyImage(), GetCacheViewAuthenticIndexQueue(), GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetPixelCacheTileSize(), _RectangleInfo::height, MagickFalse, MagickTrue, _Image::page, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), RotateImageTag, _Image::rows, SetImageProgress(), Swap, SyncCacheViewAuthenticPixels(), tile_height, tile_width, _Image::type, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by RotateImage().
| static size_t MagickMin | ( | const size_t | x, | |
| const size_t | y | |||
| ) | [inline, static] |
Definition at line 432 of file shear.c.
Referenced by ReadRadonCell(), and WriteRadonCell().
| static void RadonProjection | ( | RadonInfo * | source_cells, | |
| RadonInfo * | destination_cells, | |||
| const long | sign, | |||
| unsigned long * | projection | |||
| ) | [static] |
Definition at line 572 of file shear.c.
References GetRadonCell(), _RadonInfo::height, SetRadonCell(), and _RadonInfo::width.
Referenced by RadonTransform().
| static MagickBooleanType RadonTransform | ( | const Image * | image, | |
| const double | threshold, | |||
| unsigned long * | projection, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 653 of file shear.c.
References AcquireCacheView(), AcquireRadonInfo(), _Image::columns, DestroyCacheView(), DestroyRadonInfo(), GetCacheViewVirtualPixels(), MagickFalse, MagickTrue, RadonProjection(), ResetRadonCells(), _Image::rows, and SetRadonCell().
Referenced by DeskewImage().
| static ssize_t ReadRadonCell | ( | const RadonInfo * | radon_info, | |
| const off_t | offset, | |||
| const size_t | length, | |||
| unsigned char * | buffer | |||
| ) | [inline, static] |
Definition at line 439 of file shear.c.
References _RadonInfo::file, MagickMin(), MagickSeek, read, and SSIZE_MAX.
Referenced by GetRadonCell().
| static MagickBooleanType ResetRadonCells | ( | RadonInfo * | radon_info | ) | [static] |
Definition at line 327 of file shear.c.
References _RadonInfo::cells, DiskCache, _RadonInfo::file, _RadonInfo::height, _RadonInfo::length, MagickFalse, MagickSeek, MagickTrue, ResetMagickMemory(), _RadonInfo::type, _RadonInfo::width, and write.
Referenced by AcquireRadonInfo(), and RadonTransform().
| MagickExport Image* RotateImage | ( | const Image * | image, | |
| const double | degrees, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1864 of file shear.c.
References _Image::background_color, _Image::border_color, BorderImage(), _Image::columns, _Image::compose, CopyCompositeOp, CropToFitImage(), _Image::debug, DegreesToRadians(), DestroyImage(), DirectClass, _Image::exception, _Image::filename, GetMagickModule, _RectangleInfo::height, InheritException(), IntegralRotateImage(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::matte, 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 PolaroidImage(), PreviewImage(), XAnnotateImage(), and XDrawImage().
| static MagickBooleanType SetRadonCell | ( | const RadonInfo * | radon_info, | |
| const long | x, | |||
| const long | y, | |||
| const unsigned short | value | |||
| ) | [inline, static] |
Definition at line 547 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 2003 of file shear.c.
References _Image::background_color, _Image::border_color, BorderImage(), CloneImage(), _Image::columns, _Image::compose, CopyCompositeOp, CropToFitImage(), _Image::debug, DegreesToRadians(), DestroyImage(), DirectClass, _Image::exception, _Image::filename, GetMagickModule, _RectangleInfo::height, ImageError, InheritException(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::matte, 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().
| static ssize_t WriteRadonCell | ( | const RadonInfo * | radon_info, | |
| const off_t | offset, | |||
| const size_t | length, | |||
| const unsigned char * | buffer | |||
| ) | [inline, static] |
Definition at line 483 of file shear.c.
References _RadonInfo::file, MagickMin(), MagickSeek, SSIZE_MAX, and write.
Referenced by SetRadonCell().
| static MagickBooleanType XShearImage | ( | Image * | image, | |
| const MagickRealType | degrees, | |||
| const unsigned long | width, | |||
| const unsigned long | height, | |||
| const long | x_offset, | |||
| const long | y_offset | |||
| ) | [static] |
Definition at line 1419 of file shear.c.
References AcquireCacheView(), _Image::background_color, CMYKColorspace, _Image::colorspace, _Image::columns, ConvertRGBToCMYK(), _Image::debug, DestroyCacheView(), _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetMagickModule, GetMagickPixelPacket(), LogMagickEvent(), MagickFalse, MagickPixelCompositeAreaBlend(), MagickSignature, MagickTrue, _MagickPixelPacket::opacity, _Image::progress_monitor, SetImageProgress(), SetMagickPixelPacket(), SetPixelPacket(), _Image::signature, SyncCacheViewAuthenticPixels(), TraceEvent, and XShearImageTag.
Referenced by RotateImage(), and ShearImage().
| static MagickBooleanType YShearImage | ( | Image * | image, | |
| const MagickRealType | degrees, | |||
| const unsigned long | width, | |||
| const unsigned long | height, | |||
| const long | x_offset, | |||
| const long | y_offset | |||
| ) | [static] |
Definition at line 1639 of file shear.c.
References AcquireCacheView(), _Image::background_color, CMYKColorspace, _Image::colorspace, ConvertRGBToCMYK(), _Image::debug, DestroyCacheView(), _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetMagickModule, GetMagickPixelPacket(), LogMagickEvent(), MagickFalse, MagickPixelCompositeAreaBlend(), MagickSignature, MagickTrue, _MagickPixelPacket::opacity, _Image::progress_monitor, _Image::rows, SetImageProgress(), SetMagickPixelPacket(), SetPixelPacket(), _Image::signature, SyncCacheViewAuthenticPixels(), TraceEvent, and YShearImageTag.
Referenced by RotateImage(), and ShearImage().
1.6.1