|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/property.h"#include "MagickCore/blob.h"#include "MagickCore/cache-view.h"#include "MagickCore/color.h"#include "MagickCore/color-private.h"#include "MagickCore/colormap.h"#include "MagickCore/colorspace.h"#include "MagickCore/configure.h"#include "MagickCore/constitute.h"#include "MagickCore/decorate.h"#include "MagickCore/draw.h"#include "MagickCore/enhance.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/effect.h"#include "MagickCore/fx.h"#include "MagickCore/gem.h"#include "MagickCore/geometry.h"#include "MagickCore/image-private.h"#include "MagickCore/list.h"#include "MagickCore/log.h"#include "MagickCore/memory_.h"#include "MagickCore/monitor.h"#include "MagickCore/monitor-private.h"#include "MagickCore/montage.h"#include "MagickCore/option.h"#include "MagickCore/pixel-accessor.h"#include "MagickCore/quantize.h"#include "MagickCore/quantum.h"#include "MagickCore/random_.h"#include "MagickCore/random-private.h"#include "MagickCore/resize.h"#include "MagickCore/resource_.h"#include "MagickCore/segment.h"#include "MagickCore/shear.h"#include "MagickCore/signature-private.h"#include "MagickCore/string_.h"#include "MagickCore/string-private.h"#include "MagickCore/thread-private.h"#include "MagickCore/threshold.h"#include "MagickCore/token.h"#include "MagickCore/transform.h"#include "MagickCore/xml-tree.h"#include "MagickCore/xml-tree-private.h"
Go to the source code of this file.
Data Structures | |
| struct | _ThresholdMap |
Defines | |
| #define | ThresholdsFilename "thresholds.xml" |
| #define | AdaptiveThresholdImageTag "AdaptiveThreshold/Image" |
| #define | ThresholdImageTag "Threshold/Image" |
| #define | ThresholdImageTag "Threshold/Image" |
| #define | ClampImageTag "Clamp/Image" |
| #define | DitherImageTag "Dither/Image" |
| #define | ThresholdImageTag "Threshold/Image" |
| #define | ThresholdImageTag "Threshold/Image" |
Functions | |
| static ThresholdMap * | GetThresholdMapFile (const char *, const char *, const char *, ExceptionInfo *) |
| MagickExport Image * | AdaptiveThresholdImage (const Image *image, const size_t width, const size_t height, const double bias, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | BilevelImage (Image *image, const double threshold, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | BlackThresholdImage (Image *image, const char *thresholds, ExceptionInfo *exception) |
| static Quantum | ClampToUnsignedQuantum (const Quantum quantum) |
| MagickExport MagickBooleanType | ClampImage (Image *image, ExceptionInfo *exception) |
| MagickExport ThresholdMap * | DestroyThresholdMap (ThresholdMap *map) |
| MagickExport ThresholdMap * | GetThresholdMap (const char *map_id, ExceptionInfo *exception) |
| MagickBooleanType | ListThresholdMapFile (FILE *file, const char *xml, const char *filename, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | ListThresholdMaps (FILE *file, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | OrderedPosterizeImage (Image *image, const char *threshold_map, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | RandomThresholdImage (Image *image, const char *thresholds, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | WhiteThresholdImage (Image *image, const char *thresholds, ExceptionInfo *exception) |
| #define AdaptiveThresholdImageTag "AdaptiveThreshold/Image" |
Referenced by AdaptiveThresholdImage().
| #define ClampImageTag "Clamp/Image" |
Referenced by ClampImage().
| #define DitherImageTag "Dither/Image" |
| #define ThresholdImageTag "Threshold/Image" |
Referenced by BilevelImage(), BlackThresholdImage(), RandomThresholdImage(), and WhiteThresholdImage().
| #define ThresholdImageTag "Threshold/Image" |
| #define ThresholdImageTag "Threshold/Image" |
| #define ThresholdImageTag "Threshold/Image" |
| #define ThresholdsFilename "thresholds.xml" |
Definition at line 92 of file threshold.c.
Referenced by GetThresholdMap(), and ListThresholdMaps().
| MagickExport Image* AdaptiveThresholdImage | ( | const Image * | image, |
| const size_t | width, | ||
| const size_t | height, | ||
| const double | bias, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 152 of file threshold.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, ThrowImageException, OptionError, CloneImage(), _Image::columns, _Image::rows, MagickTrue, SetImageStorageClass(), DirectClass, DestroyImage(), AcquireCacheView(), GetCacheViewVirtualPixels(), QueueCacheViewAuthenticPixels(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, CopyPixelTrait, GetPixelMask(), SetPixelChannel(), QuantumRange, SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), AdaptiveThresholdImageTag, _Image::type, and DestroyCacheView().
| MagickExport MagickBooleanType BilevelImage | ( | Image * | image, |
| const double | threshold, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 358 of file threshold.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, SetImageStorageClass(), DirectClass, MagickTrue, AcquireCacheView(), _Image::rows, GetCacheViewAuthenticPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UpdatePixelTrait, QuantumRange, SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), ThresholdImageTag, and DestroyCacheView().
Referenced by PreviewImage(), and SetImageType().
| MagickExport MagickBooleanType BlackThresholdImage | ( | Image * | image, |
| const char * | thresholds, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 481 of file threshold.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, MagickTrue, SetImageStorageClass(), DirectClass, ParseGeometry(), _GeometryInfo::rho, SigmaValue, _GeometryInfo::sigma, XiValue, _GeometryInfo::xi, PsiValue, _GeometryInfo::psi, ChiValue, _GeometryInfo::chi, PercentValue, QuantumRange, AcquireCacheView(), _Image::rows, GetCacheViewAuthenticPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UpdatePixelTrait, SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), ThresholdImageTag, and DestroyCacheView().
| MagickExport MagickBooleanType ClampImage | ( | Image * | image, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 646 of file threshold.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _Image::storage_class, PseudoClass, _Image::colormap, _Image::colors, _PixelInfo::red, ClampToUnsignedQuantum(), SyncImage(), MagickTrue, AcquireCacheView(), _Image::rows, GetCacheViewAuthenticPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UndefinedPixelTrait, SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), ClampImageTag, and DestroyCacheView().
| MagickExport ThresholdMap* DestroyThresholdMap | ( | ThresholdMap * | map | ) |
Definition at line 778 of file threshold.c.
References _ThresholdMap::map_id, DestroyString(), _ThresholdMap::description, _ThresholdMap::levels, and RelinquishMagickMemory().
Referenced by GetThresholdMapFile(), and OrderedPosterizeImage().
| MagickExport ThresholdMap* GetThresholdMap | ( | const char * | map_id, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 817 of file threshold.c.
References GetConfigureOptions(), ThresholdsFilename, GetNextValueInLinkedList(), GetThresholdMapFile(), GetStringInfoDatum(), GetStringInfoPath(), and DestroyConfigureOptions().
Referenced by OrderedPosterizeImage().
| static ThresholdMap * GetThresholdMapFile | ( | const char * | xml, |
| const char * | filename, | ||
| const char * | map_id, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 869 of file threshold.c.
References LogMagickEvent(), ConfigureEvent, GetMagickModule, NewXMLTree(), GetXMLTreeChild(), GetNextXMLTreeTag(), GetXMLTreeAttribute(), LocaleCompare(), ThrowMagickException(), OptionError, DestroyXMLTree(), AcquireMagickMemory(), ThrowFatalException, ResourceLimitFatalError, _ThresholdMap::map_id, _ThresholdMap::description, _ThresholdMap::levels, ConstantString(), GetXMLTreeContent(), DestroyThresholdMap(), _ThresholdMap::width, StringToUnsignedLong(), _ThresholdMap::height, _ThresholdMap::divisor, StringToLong(), and AcquireQuantumMemory().
Referenced by GetThresholdMap().
| MagickBooleanType ListThresholdMapFile | ( | FILE * | file, |
| const char * | xml, | ||
| const char * | filename, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1074 of file threshold.c.
References LogMagickEvent(), ConfigureEvent, GetMagickModule, NewXMLTree(), MagickFalse, FormatLocaleFile(), GetXMLTreeChild(), GetNextXMLTreeTag(), GetXMLTreeAttribute(), ThrowMagickException(), OptionError, DestroyXMLTree(), GetXMLTreeContent(), and MagickTrue.
Referenced by ListThresholdMaps().
| MagickExport MagickBooleanType ListThresholdMaps | ( | FILE * | file, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1158 of file threshold.c.
References MagickFalse, GetConfigureOptions(), ThresholdsFilename, FormatLocaleFile(), GetNextValueInLinkedList(), GetStringInfoPath(), ListThresholdMapFile(), GetStringInfoDatum(), DestroyConfigureOptions(), and MagickTrue.
| MagickExport MagickBooleanType OrderedPosterizeImage | ( | Image * | image, |
| const char * | threshold_map, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1234 of file threshold.c.
References MaxTextExtent, CompositePixelChannel, _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, MagickTrue, GetThresholdMap(), ThrowMagickException(), OptionError, MaxPixelChannels, GetMagickToken(), StringToDouble(), SetImageStorageClass(), DirectClass, AcquireCacheView(), _Image::rows, GetCacheViewAuthenticPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UpdatePixelTrait, MagickEpsilon, QuantumScale, _ThresholdMap::divisor, RoundToQuantum, _ThresholdMap::levels, _ThresholdMap::width, _ThresholdMap::height, QuantumRange, SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), DitherImageTag, DestroyCacheView(), and DestroyThresholdMap().
| MagickExport MagickBooleanType RandomThresholdImage | ( | Image * | image, |
| const char * | thresholds, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1425 of file threshold.c.
References random_info, _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, MagickTrue, GetPixelInfo(), QuantumRange, ParseGeometry(), _GeometryInfo::rho, _GeometryInfo::sigma, SigmaValue, SetImageStorageClass(), DirectClass, AcquireRandomInfoThreadSet(), AcquireCacheView(), _Image::rows, GetOpenMPThreadId(), GetCacheViewAuthenticPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UpdatePixelTrait, GetPseudoRandomValue(), SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), ThresholdImageTag, DestroyCacheView(), and DestroyRandomInfoThreadSet().
| MagickExport MagickBooleanType WhiteThresholdImage | ( | Image * | image, |
| const char * | thresholds, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1598 of file threshold.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, MagickTrue, SetImageStorageClass(), DirectClass, ParseGeometry(), _GeometryInfo::rho, SigmaValue, _GeometryInfo::sigma, XiValue, _GeometryInfo::xi, PsiValue, _GeometryInfo::psi, ChiValue, _GeometryInfo::chi, PercentValue, QuantumRange, AcquireCacheView(), _Image::rows, GetCacheViewAuthenticPixels(), _Image::columns, GetPixelMask(), GetPixelChannels(), GetPixelChannelMapChannel(), GetPixelChannelMapTraits(), UpdatePixelTrait, SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), ThresholdImageTag, and DestroyCacheView().