|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/artifact.h"#include "MagickCore/attribute.h"#include "MagickCore/blob-private.h"#include "MagickCore/cache-private.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 |
Defines | |
| #define | RotateImageTag "Rotate/Image" |
| #define | XShearImageTag "XShear/Image" |
| #define | YShearImageTag "YShear/Image" |
Typedefs | |
| typedef struct _RadonInfo | RadonInfo |
Functions | |
| static MagickBooleanType | 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 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 (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 MagickRealType 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 MagickRealType 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 RadonInfo* AcquireRadonInfo | ( | const Image * | image, |
| const size_t | width, | ||
| const size_t | height, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 304 of file shear.c.
References AcquireMagickMemory(), ResetMagickMemory(), _RadonInfo::width, _RadonInfo::height, _RadonInfo::length, _RadonInfo::cells, _RadonInfo::type, MemoryCache, AcquireMagickResource(), AreaResource, MagickFalse, MemoryResource, _RadonInfo::mapped, MagickTrue, MapBlob(), IOMode, RelinquishMagickResource(), _RadonInfo::file, DiskResource, ThrowMagickException(), GetMagickModule, CacheError, _Image::filename, DestroyRadonInfo(), DiskCache, AcquireUniqueFileResource(), _RadonInfo::path, MapResource, ResetRadonCells(), and MapCache.
Referenced by RadonTransform().
| static MagickBooleanType CropToFitImage | ( | Image ** | image, |
| const MagickRealType | x_shear, | ||
| const MagickRealType | y_shear, | ||
| const MagickRealType | width, | ||
| const MagickRealType | height, | ||
| const MagickBooleanType | rotate, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 111 of file shear.c.
References _PointInfo::x, _PointInfo::y, MagickFalse, _RectangleInfo::x, _RectangleInfo::y, _RectangleInfo::width, _RectangleInfo::height, ParseAbsoluteGeometry(), CropImage(), _Image::page, DestroyImage(), and MagickTrue.
Referenced by ShearImage(), and ShearRotateImage().
| MagickExport Image* DeskewImage | ( | const Image * | image, |
| const double | threshold, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 818 of file shear.c.
References _Image::columns, AcquireQuantumMemory(), ThrowImageException, ResourceLimitError, RadonTransform(), MagickFalse, RelinquishMagickMemory(), CloneImage(), MagickTrue, SetImageVirtualPixelMethod(), BackgroundVirtualPixelMethod, RadiansToDegrees(), _Image::debug, LogMagickEvent(), TransformEvent, GetMagickModule, _AffineMatrix::sx, DegreesToRadians(), _AffineMatrix::rx, _AffineMatrix::ry, _AffineMatrix::sy, _AffineMatrix::tx, _AffineMatrix::ty, GetImageArtifact(), AffineTransformImage(), DestroyImage(), GetImageBackgroundColor(), StringToLong(), StatisticImage(), MedianStatistic, GetImageBoundingBox(), _RectangleInfo::width, _RectangleInfo::height, _RectangleInfo::x, _RectangleInfo::y, and CropImage().
Definition at line 235 of file shear.c.
References _RadonInfo::type, MemoryCache, _RadonInfo::mapped, MagickFalse, _RadonInfo::cells, RelinquishMagickMemory(), UnmapBlob(), _RadonInfo::length, RelinquishMagickResource(), MemoryResource, MapCache, MapResource, DiskCache, _RadonInfo::file, RelinquishUniqueFileResource(), _RadonInfo::path, and DiskResource.
Referenced by AcquireRadonInfo(), and RadonTransform().
| static void GetImageBackgroundColor | ( | Image * | image, |
| const ssize_t | offset, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 757 of file shear.c.
References GetPixelInfo(), AcquireCacheView(), _Image::rows, GetCacheViewVirtualPixels(), _Image::columns, _PixelInfo::red, QuantumScale, GetPixelRed(), _PixelInfo::green, GetPixelGreen(), _PixelInfo::blue, GetPixelBlue(), GetPixelAlphaTraits(), UpdatePixelTrait, _PixelInfo::alpha, GetPixelAlpha(), GetPixelChannels(), DestroyCacheView(), _Image::background_color, ClampToQuantum(), and QuantumRange.
Referenced by DeskewImage().
| static unsigned short GetRadonCell | ( | const RadonInfo * | radon_info, |
| const ssize_t | x, | ||
| const ssize_t | y | ||
| ) | [inline, static] |
Definition at line 468 of file shear.c.
References _RadonInfo::height, _RadonInfo::cells, _RadonInfo::length, _RadonInfo::type, DiskCache, and ReadRadonCell().
Referenced by RadonProjection().
| MagickExport Image* IntegralRotateImage | ( | const Image * | image, |
| size_t | rotations, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 955 of file shear.c.
References _Image::page, CloneImage(), MagickTrue, _Image::rows, _Image::columns, AcquireCacheView(), GetPixelCacheTileSize(), MagickFalse, GetCacheViewVirtualPixels(), QueueCacheViewAuthenticPixels(), GetPixelChannels(), GetPixelMask(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, SetPixelChannel(), SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), RotateImageTag, Swap, _RectangleInfo::width, _RectangleInfo::height, _RectangleInfo::x, _RectangleInfo::y, DestroyCacheView(), _Image::type, and DestroyImage().
Referenced by RotateImage(), and ShearRotateImage().
| static size_t MagickMin | ( | const size_t | x, |
| const size_t | y | ||
| ) | [inline, static] |
Definition at line 374 of file shear.c.
Referenced by ReadRadonCell(), and WriteRadonCell().
| static void RadonProjection | ( | RadonInfo * | source_cells, |
| RadonInfo * | destination_cells, | ||
| const ssize_t | sign, | ||
| size_t * | projection | ||
| ) | [static] |
Definition at line 514 of file shear.c.
References _RadonInfo::width, _RadonInfo::height, GetRadonCell(), and SetRadonCell().
Referenced by RadonTransform().
| static MagickBooleanType RadonTransform | ( | const Image * | image, |
| const double | threshold, | ||
| size_t * | projection, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 598 of file shear.c.
References _Image::columns, AcquireRadonInfo(), _Image::rows, DestroyRadonInfo(), MagickFalse, ResetRadonCells(), MagickTrue, AcquireCacheView(), GetCacheViewVirtualPixels(), GetPixelIntensity(), SetRadonCell(), GetPixelChannels(), RadonProjection(), and DestroyCacheView().
Referenced by DeskewImage().
| static ssize_t ReadRadonCell | ( | const RadonInfo * | radon_info, |
| const MagickOffsetType | offset, | ||
| const size_t | length, | ||
| unsigned char * | buffer | ||
| ) | [inline, static] |
Definition at line 381 of file shear.c.
References _RadonInfo::file, and MagickMin().
Referenced by GetRadonCell().
| static MagickBooleanType ResetRadonCells | ( | RadonInfo * | radon_info | ) | [static] |
Definition at line 271 of file shear.c.
References _RadonInfo::type, DiskCache, ResetMagickMemory(), _RadonInfo::cells, _RadonInfo::length, MagickTrue, _RadonInfo::file, _RadonInfo::height, _RadonInfo::width, and MagickFalse.
Referenced by AcquireRadonInfo(), and RadonTransform().
| static MagickBooleanType SetRadonCell | ( | const RadonInfo * | radon_info, |
| const ssize_t | x, | ||
| const ssize_t | y, | ||
| const unsigned short | value | ||
| ) | [inline, static] |
Definition at line 489 of file shear.c.
References _RadonInfo::height, _RadonInfo::cells, _RadonInfo::length, MagickFalse, _RadonInfo::type, DiskCache, MagickTrue, 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 1843 of file shear.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, ThrowImageException, ImageError, CloneImage(), MagickTrue, ResourceLimitError, _PointInfo::x, DegreesToRadians(), _PointInfo::y, SetImageStorageClass(), DirectClass, DestroyImage(), _Image::matte, SetImageAlphaChannel(), OpaqueAlphaChannel, _Image::columns, _Image::rows, _Image::border_color, _Image::background_color, _Image::compose, CopyCompositeOp, _RectangleInfo::width, _RectangleInfo::height, BorderImage(), XShearImage(), YShearImage(), CropToFitImage(), and _Image::page.
Referenced by PreviewImage().
| MagickExport Image* ShearRotateImage | ( | const Image * | image, |
| const double | degrees, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1983 of file shear.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, IntegralRotateImage(), ThrowImageException, ResourceLimitError, _PointInfo::x, DegreesToRadians(), _PointInfo::y, SetImageStorageClass(), DirectClass, DestroyImage(), _Image::matte, SetImageAlphaChannel(), OpaqueAlphaChannel, _Image::columns, _Image::rows, _Image::border_color, _Image::background_color, _Image::compose, CopyCompositeOp, _RectangleInfo::width, _RectangleInfo::height, BorderImage(), XShearImage(), YShearImage(), CropToFitImage(), MagickTrue, and _Image::page.
| static ssize_t WriteRadonCell | ( | const RadonInfo * | radon_info, |
| const MagickOffsetType | offset, | ||
| const size_t | length, | ||
| const unsigned char * | buffer | ||
| ) | [inline, static] |
Definition at line 425 of file shear.c.
References _RadonInfo::file, and MagickMin().
Referenced by SetRadonCell().
| static MagickBooleanType XShearImage | ( | Image * | image, |
| const MagickRealType | degrees, | ||
| const size_t | width, | ||
| const size_t | height, | ||
| const ssize_t | x_offset, | ||
| const ssize_t | y_offset, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 1408 of file shear.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, MagickTrue, _Image::background_color, AcquireCacheView(), GetCacheViewAuthenticPixels(), _Image::columns, GetPixelChannels(), GetPixelInfo(), GetPixelInfoPixel(), CompositePixelInfoAreaBlend(), _PixelInfo::alpha, GetPixelAlpha(), SetPixelInfoPixel(), SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), XShearImageTag, and DestroyCacheView().
Referenced by ShearImage(), and ShearRotateImage().
| static MagickBooleanType YShearImage | ( | Image * | image, |
| const MagickRealType | degrees, | ||
| const size_t | width, | ||
| const size_t | height, | ||
| const ssize_t | x_offset, | ||
| const ssize_t | y_offset, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 1623 of file shear.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, MagickTrue, _Image::background_color, AcquireCacheView(), GetCacheViewAuthenticPixels(), _Image::rows, GetPixelChannels(), GetPixelInfo(), GetPixelInfoPixel(), CompositePixelInfoAreaBlend(), _PixelInfo::alpha, GetPixelAlpha(), SetPixelInfoPixel(), SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), YShearImageTag, and DestroyCacheView().
Referenced by ShearImage(), and ShearRotateImage().