96 #define ThresholdsFilename "thresholds.xml" 119 #if MAGICKCORE_ZERO_CONFIGURATION_SUPPORT 120 #include "MagickCore/threshold-map.h" 122 static const char *
const 124 "<?xml version=\"1.0\"?>" 126 " <threshold map=\"threshold\" alias=\"1x1\">" 127 " <description>Threshold 1x1 (non-dither)</description>" 128 " <levels width=\"1\" height=\"1\" divisor=\"2\">" 132 " <threshold map=\"checks\" alias=\"2x1\">" 133 " <description>Checkerboard 2x1 (dither)</description>" 134 " <levels width=\"2\" height=\"2\" divisor=\"3\">" 183 const size_t width,
const size_t height,
const double bias,
186 #define AdaptiveThresholdImageTag "AdaptiveThreshold/Image" 210 assert(image != (
Image *) NULL);
217 if (threshold_image == (
Image *) NULL)
218 return((
Image *) NULL);
219 if ((width == 0) || (height == 0))
220 return(threshold_image);
225 return((
Image *) NULL);
235 #if defined(MAGICKCORE_OPENMP_SUPPORT) 236 #pragma omp parallel for schedule(static) shared(progress,status) \ 237 magick_number_threads(image,threshold_image,image->rows,1) 239 for (y=0; y < (ssize_t) image->
rows; y++)
264 (height/2L),image->
columns+width,height,exception);
289 channel_bias[channel]=0.0;
290 channel_sum[channel]=0.0;
291 for (v=0; v < (ssize_t) height; v++)
293 for (u=0; u < (ssize_t) width; u++)
295 if (u == (ssize_t) (width-1))
296 channel_bias[channel]+=pixels[i];
297 channel_sum[channel]+=pixels[i];
303 for (x=0; x < (ssize_t) image->
columns; x++)
322 channel_sum[channel]-=channel_bias[channel];
323 channel_bias[channel]=0.0;
325 for (v=0; v < (ssize_t) height; v++)
327 channel_bias[channel]+=pixels[i];
329 channel_sum[channel]+=pixels[i];
332 mean=(double) (channel_sum[channel]/number_pixels+bias);
346 #if defined(MAGICKCORE_OPENMP_SUPPORT) 361 return(threshold_image);
396 #define MaxIntensity 255 400 *cumulative_histogram,
417 sizeof(*cumulative_histogram));
419 sizeof(*black_entropy));
421 sizeof(*white_entropy));
422 if ((cumulative_histogram == (
double *) NULL) ||
423 (black_entropy == (
double *) NULL) || (white_entropy == (
double *) NULL))
425 if (white_entropy != (
double *) NULL)
427 if (black_entropy != (
double *) NULL)
429 if (cumulative_histogram != (
double *) NULL)
430 cumulative_histogram=(
double *)
439 cumulative_histogram[0]=histogram[0];
441 cumulative_histogram[i]=cumulative_histogram[i-1]+histogram[i];
448 black_entropy[j]=0.0;
449 if (cumulative_histogram[j] > epsilon)
452 for (i=0; i <= j; i++)
453 if (histogram[i] > epsilon)
454 entropy-=histogram[i]/cumulative_histogram[j]*
455 log(histogram[i]/cumulative_histogram[j]);
456 black_entropy[j]=entropy;
461 white_entropy[j]=0.0;
462 if ((1.0-cumulative_histogram[j]) > epsilon)
466 if (histogram[i] > epsilon)
467 entropy-=histogram[i]/(1.0-cumulative_histogram[j])*
468 log(histogram[i]/(1.0-cumulative_histogram[j]));
469 white_entropy[j]=entropy;
475 maximum_entropy=black_entropy[0]+white_entropy[0];
478 if ((black_entropy[j]+white_entropy[j]) > maximum_entropy)
480 maximum_entropy=black_entropy[j]+white_entropy[j];
481 threshold=(size_t) j;
512 sizeof(*probability));
514 if ((myu == (
double *) NULL) || (omega == (
double *) NULL) ||
515 (probability == (
double *) NULL) || (sigma == (
double *) NULL))
517 if (sigma != (
double *) NULL)
519 if (probability != (
double *) NULL)
521 if (omega != (
double *) NULL)
523 if (myu != (
double *) NULL)
533 probability[i]=histogram[i];
537 omega[0]=probability[0];
541 omega[i]=omega[i-1]+probability[i];
542 myu[i]=myu[i-1]+i*probability[i];
552 if ((omega[i] != 0.0) && (omega[i] != 1.0))
553 sigma[i]=pow(myu[
MaxIntensity]*omega[i]-myu[i],2.0)/(omega[i]*(1.0-
555 if (sigma[i] > max_sigma)
558 threshold=(double) i;
601 if (histogram[i] > 0.0)
608 if (histogram[i] > 0.0)
616 if (histogram[i] > count)
627 if ((max-start) >= (end-max))
632 c=(-1.0)*(a*x1+b*y1);
633 inverse_ratio=1.0/sqrt(a*a+b*b+c*c);
636 if (x2 == (
double) start)
637 for (i=start; i < max; i++)
639 segment=inverse_ratio*(a*i+b*histogram[i]+c);
640 distance=sqrt(segment*segment);
641 if ((distance > max_distance) && (segment > 0.0))
644 max_distance=distance;
648 for (i=end; i > max; i--)
650 segment=inverse_ratio*(a*i+b*histogram[i]+c);
651 distance=sqrt(segment*segment);
652 if ((distance > max_distance) && (segment < 0.0))
655 max_distance=distance;
688 assert(image != (
Image *) NULL);
694 if (histogram == (
double *) NULL)
698 (void) memset(histogram,0,(
MaxIntensity+1UL)*
sizeof(*histogram));
700 for (y=0; y < (ssize_t) image->
rows; y++)
709 if (p == (
const Quantum *) NULL)
711 for (x=0; x < (ssize_t) image->
columns; x++)
727 histogram[i]=gamma*histogram[i];
759 (void)
SetImageProperty(image,
"auto-threshold:threshold",property,exception);
809 #define ThresholdImageTag "Threshold/Image" 823 assert(image != (
Image *) NULL);
837 #if defined(MAGICKCORE_OPENMP_SUPPORT) 838 #pragma omp parallel for schedule(static) shared(progress,status) \ 839 magick_number_threads(image,image,image->rows,1) 841 for (y=0; y < (ssize_t) image->
rows; y++)
857 for (x=0; x < (ssize_t) image->
columns; x++)
885 #if defined(MAGICKCORE_OPENMP_SUPPORT) 931 #define ThresholdImageTag "Threshold/Image" 954 assert(image != (
Image *) NULL);
958 if (thresholds == (
const char *) NULL)
966 threshold.
red=geometry_info.
rho;
968 threshold.
blue=geometry_info.
rho;
970 threshold.
alpha=100.0;
974 threshold.
blue=geometry_info.
xi;
998 #if defined(MAGICKCORE_OPENMP_SUPPORT) 999 #pragma omp parallel for schedule(static) shared(progress,status) \ 1000 magick_number_threads(image,image,image->rows,1) 1002 for (y=0; y < (ssize_t) image->
rows; y++)
1018 for (x=0; x < (ssize_t) image->
columns; x++)
1034 pixel=(double) q[i];
1047 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1090 #define ClampImageTag "Clamp/Image" 1104 assert(image != (
Image *) NULL);
1117 for (i=0; i < (ssize_t) image->
colors; i++)
1133 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1134 #pragma omp parallel for schedule(static) shared(progress,status) \ 1135 magick_number_threads(image,image,image->rows,1) 1137 for (y=0; y < (ssize_t) image->
rows; y++)
1153 for (x=0; x < (ssize_t) image->
columns; x++)
1175 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1222 #define ThresholdImageTag "Threshold/Image" 1249 assert(image != (
Image *) NULL);
1257 if (artifact != (
const char *) NULL)
1261 if ((ssize_t) illuminant < 0)
1264 start=(*start_color);
1335 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1336 #pragma omp parallel for schedule(static) shared(progress,status) \ 1337 magick_number_threads(image,image,image->rows,1) 1339 for (y=0; y < (ssize_t) image->
rows; y++)
1355 for (x=0; x < (ssize_t) image->
columns; x++)
1383 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1423 if (map->
map_id != (
char *) NULL)
1427 if (map->
levels != (ssize_t *) NULL)
1468 #if !MAGICKCORE_ZERO_CONFIGURATION_SUPPORT 1548 "Loading threshold map file \"%s\" ...",filename);
1558 if ((attribute != (
char *) NULL) && (
LocaleCompare(map_id,attribute) == 0))
1561 if ((attribute != (
char *) NULL) && (
LocaleCompare(map_id,attribute) == 0))
1573 "XmlMissingElement",
"<description>, map \"%s\"",map_id);
1581 "XmlMissingElement",
"<levels>, map \"%s\"", map_id);
1586 map->
map_id=(
char *) NULL;
1588 map->
levels=(ssize_t *) NULL;
1590 if (attribute != (
char *) NULL)
1593 if (content != (
char *) NULL)
1596 if (attribute == (
char *) NULL)
1599 "XmlMissingAttribute",
"<levels width>, map \"%s\"",map_id);
1605 if (map->
width == 0)
1608 "XmlInvalidAttribute",
"<levels width>, map \"%s\"",map_id);
1614 if (attribute == (
char *) NULL)
1617 "XmlMissingAttribute",
"<levels height>, map \"%s\"",map_id);
1626 "XmlInvalidAttribute",
"<levels height>, map \"%s\"",map_id);
1632 if (attribute == (
char *) NULL)
1635 "XmlMissingAttribute",
"<levels divisor>, map \"%s\"",map_id);
1644 "XmlInvalidAttribute",
"<levels divisor>, map \"%s\"",map_id);
1650 if (content == (
char *) NULL)
1653 "XmlMissingContent",
"<levels>, map \"%s\"",map_id);
1660 if (map->
levels == (ssize_t *) NULL)
1662 for (i=0; i < (ssize_t) (map->
width*map->
height); i++)
1664 map->
levels[i]=(ssize_t) strtol(content,&p,10);
1668 "XmlInvalidContent",
"<level> too few values, map \"%s\"",map_id);
1676 "XmlInvalidContent",
"<level> %.20g out of range, map \"%s\"",
1677 (double) map->
levels[i],map_id);
1684 value=(double) strtol(content,&p,10);
1689 "XmlInvalidContent",
"<level> too many values, map \"%s\"",map_id);
1741 assert( xml != (
char *) NULL );
1742 assert( file != (FILE *) NULL );
1744 "Loading threshold map file \"%s\" ...",filename);
1748 (void)
FormatLocaleFile(file,
"%-16s %-12s %s\n",
"Map",
"Alias",
"Description");
1750 "----------------------------------------------------\n");
1756 if (map == (
char *) NULL)
1759 "XmlMissingAttribute",
"<map>");
1768 "XmlMissingElement",
"<description>, map \"%s\"",map);
1773 if (content == (
char *) NULL)
1776 "XmlMissingContent",
"<description>, map \"%s\"", map);
1825 if (file == (FILE *) NULL)
1829 "\n Threshold Maps for Ordered Dither Operations\n");
1892 #define DitherImageTag "Dither/Image" 1919 assert(image != (
Image *) NULL);
1925 if (threshold_map == (
const char *) NULL)
1927 p=(
char *) threshold_map;
1928 while (((isspace((
int) ((
unsigned char) *p)) != 0) || (*p ==
',')) &&
1932 while (((isspace((
int) ((
unsigned char) *p)) == 0) && (*p !=
',')) &&
1937 token[p-threshold_map]=(*p);
1940 token[p-threshold_map]=
'\0';
1945 "InvalidArgument",
"%s : '%s'",
"ordered-dither",threshold_map);
1950 p=strchr((
char *) threshold_map,
',');
1951 if ((p != (
char *) NULL) && (isdigit((
int) ((
unsigned char) *(++p))) != 0))
1965 if (fabs(levels[i]) >= 1)
1972 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1973 #pragma omp parallel for schedule(static) shared(progress,status) \ 1974 magick_number_threads(image,image,image->rows,1) 1976 for (y=0; y < (ssize_t) image->
rows; y++)
1992 for (x=0; x < (ssize_t) image->
columns; x++)
2015 level=threshold/(map->
divisor-1);
2016 threshold-=level*(map->
divisor-1);
2031 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2076 const double epsilon)
2081 sign=(double) quantum < 0.0 ? -1.0 : 1.0;
2082 if ((sign*quantum) >= epsilon)
2084 return((
Quantum) (sign*epsilon));
2090 #define PerceptibleImageTag "Perceptible/Image" 2104 assert(image != (
Image *) NULL);
2117 for (i=0; i < (ssize_t) image->
colors; i++)
2137 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2138 #pragma omp parallel for schedule(static) shared(progress,status) \ 2139 magick_number_threads(image,image,image->rows,1) 2141 for (y=0; y < (ssize_t) image->
rows; y++)
2157 for (x=0; x < (ssize_t) image->
columns; x++)
2179 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2224 const double min_threshold,
const double max_threshold,
ExceptionInfo *exception)
2226 #define ThresholdImageTag "Threshold/Image" 2243 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2248 assert(image != (
Image *) NULL);
2263 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2265 #pragma omp parallel for schedule(static) shared(progress,status) \ 2266 magick_number_threads(image,image,image->rows,key == ~0UL) 2268 for (y=0; y < (ssize_t) image->
rows; y++)
2287 for (x=0; x < (ssize_t) image->
columns; x++)
2301 if ((
double) q[i] < min_threshold)
2302 threshold=min_threshold;
2304 if ((
double) q[i] > max_threshold)
2305 threshold=max_threshold;
2320 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2370 const double low_black,
const double low_white,
const double high_white,
2373 #define ThresholdImageTag "Threshold/Image" 2387 assert(image != (
Image *) NULL);
2401 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2402 #pragma omp parallel for schedule(static) shared(progress,status) \ 2403 magick_number_threads(image,image,image->rows,1) 2405 for (y=0; y < (ssize_t) image->
rows; y++)
2421 for (x=0; x < (ssize_t) image->
columns; x++)
2437 pixel=(double) q[i];
2438 if (pixel < low_black)
2441 if ((pixel >= low_black) && (pixel < low_white))
2445 if ((pixel >= low_white) && (pixel <= high_white))
2448 if ((pixel > high_white) && (pixel <= high_black))
2450 high_black-high_white)*(high_black-pixel));
2452 if (pixel > high_black)
2466 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2512 #define ThresholdImageTag "Threshold/Image" 2535 assert(image != (
Image *) NULL);
2539 if (thresholds == (
const char *) NULL)
2547 threshold.
red=geometry_info.
rho;
2549 threshold.
blue=geometry_info.
rho;
2551 threshold.
alpha=100.0;
2555 threshold.
blue=geometry_info.
xi;
2579 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2580 #pragma omp parallel for schedule(static) shared(progress,status) \ 2581 magick_number_threads(image,image,image->rows,1) 2583 for (y=0; y < (ssize_t) image->
rows; y++)
2599 for (x=0; x < (ssize_t) image->
columns; x++)
2615 pixel=(double) q[i];
2628 #if defined(MAGICKCORE_OPENMP_SUPPORT)
MagickExport MagickBooleanType BlackThresholdImage(Image *image, const char *thresholds, ExceptionInfo *exception)
MagickExport MagickBooleanType RangeThresholdImage(Image *image, const double low_black, const double low_white, const double high_white, const double high_black, ExceptionInfo *exception)
MagickDoubleType MagickRealType
MagickExport CacheView * DestroyCacheView(CacheView *cache_view)
MagickExport void ConvertRGBToHSL(const double red, const double green, const double blue, double *hue, double *saturation, double *lightness)
MagickExport XMLTreeInfo * DestroyXMLTree(XMLTreeInfo *xml_info)
MagickProgressMonitor progress_monitor
MagickExport MagickBooleanType SyncImage(Image *image, ExceptionInfo *exception)
MagickExport MagickBooleanType TransformImageColorspace(Image *image, const ColorspaceType colorspace, ExceptionInfo *exception)
static unsigned long StringToUnsignedLong(const char *magick_restrict value)
static RandomInfo ** AcquireRandomInfoTLS(void)
MagickExport ssize_t ParseCommandOption(const CommandOption option, const MagickBooleanType list, const char *options)
static const char *const BuiltinMap
#define ThrowFatalException(severity, tag)
MagickExport XMLTreeInfo * GetNextXMLTreeTag(XMLTreeInfo *xml_info)
MagickExport MagickBooleanType ListThresholdMaps(FILE *file, ExceptionInfo *exception)
MagickExport const char * GetImageArtifact(const Image *image, const char *artifact)
static PixelTrait GetPixelChannelTraits(const Image *magick_restrict image, const PixelChannel channel)
MagickExport Image * AdaptiveThresholdImage(const Image *image, const size_t width, const size_t height, const double bias, ExceptionInfo *exception)
#define ThresholdsFilename
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
static MagickBooleanType IsGrayColorspace(const ColorspaceType colorspace)
MagickExport const Quantum * GetCacheViewVirtualPixels(const CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
static long StringToLong(const char *magick_restrict value)
MagickExport XMLTreeInfo * GetXMLTreeChild(XMLTreeInfo *xml_info, const char *tag)
MagickExport MagickBooleanType PerceptibleImage(Image *image, const double epsilon, ExceptionInfo *exception)
#define ThrowBinaryException(severity, tag, context)
MagickExport unsigned long GetRandomSecretKey(const RandomInfo *random_info)
MagickExport void GetPixelInfo(const Image *image, PixelInfo *pixel)
static Quantum ClampToQuantum(const MagickRealType quantum)
MagickBooleanType ListThresholdMapFile(FILE *file, const char *xml, const char *filename, ExceptionInfo *exception)
#define PerceptibleImageTag
MagickPrivate void ConvertRGBToHSB(const double, const double, const double, double *, double *, double *)
MagickExport void * GetNextValueInLinkedList(LinkedListInfo *list_info)
#define MagickMinimumValue
#define MagickCoreSignature
MagickExport Quantum * GetCacheViewAuthenticPixels(CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
static Quantum ClampPixel(const MagickRealType pixel)
MagickExport unsigned char * GetStringInfoDatum(const StringInfo *string_info)
MagickExport ssize_t FormatLocaleFile(FILE *file, const char *magick_restrict format,...)
unsigned int MagickStatusType
static double PerceptibleReciprocal(const double x)
MagickExport void * AcquireCriticalMemory(const size_t size)
#define ThresholdImageTag
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
MagickExport magick_hot_spot size_t GetNextToken(const char *magick_restrict start, const char **magick_restrict end, const size_t extent, char *magick_restrict token)
static int GetOpenMPThreadId(void)
MagickExport MagickBooleanType SetImageProperty(Image *image, const char *property, const char *value, ExceptionInfo *exception)
MagickExport const char * GetXMLTreeContent(XMLTreeInfo *xml_info)
MagickExport MagickBooleanType IsStringTrue(const char *value)
MagickExport MagickBooleanType IsEventLogging(void)
static double OTSUThreshold(const Image *image, const double *histogram, ExceptionInfo *exception)
MagickExport ThresholdMap * GetThresholdMap(const char *map_id, ExceptionInfo *exception)
MagickExport int GetMagickPrecision(void)
MagickPrivate void ConvertRGBToHSV(const double, const double, const double, double *, double *, double *)
MagickExport MagickBooleanType ColorThresholdImage(Image *image, const PixelInfo *start_color, const PixelInfo *stop_color, ExceptionInfo *exception)
MagickExport Quantum * QueueCacheViewAuthenticPixels(CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
MagickPrivate void ConvertRGBToLab(const double, const double, const double, const IlluminantType, double *, double *, double *)
MagickBooleanType(* MagickProgressMonitor)(const char *, const MagickOffsetType, const MagickSizeType, void *)
#define AdaptiveThresholdImageTag
MagickExport MagickBooleanType SetImageStorageClass(Image *image, const ClassType storage_class, ExceptionInfo *exception)
static double TriangleThreshold(const double *histogram)
static size_t GetPixelChannels(const Image *magick_restrict image)
MagickExport MagickBooleanType AcquireImageColormap(Image *image, const size_t colors, ExceptionInfo *exception)
MagickExport int LocaleCompare(const char *p, const char *q)
char filename[MagickPathExtent]
#define GetMagickModule()
MagickExport const char * GetStringInfoPath(const StringInfo *string_info)
static PixelChannel GetPixelChannelChannel(const Image *magick_restrict image, const ssize_t offset)
static MagickRealType GetPixelInfoChannel(const PixelInfo *magick_restrict pixel_info, const PixelChannel channel)
MagickExport CacheView * AcquireVirtualCacheView(const Image *image, ExceptionInfo *exception)
MagickExport const char * GetXMLTreeAttribute(XMLTreeInfo *xml_info, const char *tag)
MagickExport MagickBooleanType RandomThresholdImage(Image *image, const double min_threshold, const double max_threshold, ExceptionInfo *exception)
MagickExport MagickBooleanType SetImageColorspace(Image *image, const ColorspaceType colorspace, ExceptionInfo *exception)
MagickExport char * DestroyString(char *string)
MagickExport double GetPseudoRandomValue(RandomInfo *magick_restrict random_info)
static void SetPixelIndex(const Image *magick_restrict image, const Quantum index, Quantum *magick_restrict pixel)
MagickExport MagickStatusType ParseGeometry(const char *geometry, GeometryInfo *geometry_info)
static void SetPixelChannel(const Image *magick_restrict image, const PixelChannel channel, const Quantum quantum, Quantum *magick_restrict pixel)
MagickExport ThresholdMap * DestroyThresholdMap(ThresholdMap *map)
static double StringToDouble(const char *magick_restrict string, char *magick_restrict *sentinal)
static ThresholdMap * GetThresholdMapFile(const char *, const char *, const char *, ExceptionInfo *)
MagickExport MagickBooleanType BilevelImage(Image *image, const double threshold, ExceptionInfo *exception)
MagickPrivate void ConvertRGBToHWB(const double, const double, const double, double *, double *, double *)
static RandomInfo * random_info
static Quantum PerceptibleThreshold(const Quantum quantum, const double epsilon)
MagickExport void * RelinquishMagickMemory(void *memory)
MagickExport MagickBooleanType WhiteThresholdImage(Image *image, const char *thresholds, ExceptionInfo *exception)
MagickExport MagickBooleanType ClampImage(Image *image, ExceptionInfo *exception)
static double KapurThreshold(const Image *image, const double *histogram, ExceptionInfo *exception)
MagickExport MagickBooleanType SyncCacheViewAuthenticPixels(CacheView *magick_restrict cache_view, ExceptionInfo *exception)
MagickExport CacheView * AcquireAuthenticCacheView(const Image *image, ExceptionInfo *exception)
ColorspaceType colorspace
MagickExport MagickBooleanType OrderedDitherImage(Image *image, const char *threshold_map, ExceptionInfo *exception)
MagickPrivate void ConvertRGBToHCL(const double, const double, const double, double *, double *, double *)
MagickExport MagickRealType GetPixelIntensity(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
MagickExport MagickBooleanType AutoThresholdImage(Image *image, const AutoThresholdMethod method, ExceptionInfo *exception)
MagickExport Image * DestroyImage(Image *image)
MagickExport char * ConstantString(const char *source)
MagickExport Image * CloneImage(const Image *image, const size_t columns, const size_t rows, const MagickBooleanType detach, ExceptionInfo *exception)
ColorspaceType colorspace
MagickExport XMLTreeInfo * NewXMLTree(const char *xml, ExceptionInfo *exception)
MagickExport MagickBooleanType SetImageProgress(const Image *image, const char *tag, const MagickOffsetType offset, const MagickSizeType extent)
static RandomInfo ** DestroyRandomInfoTLS(RandomInfo **random_info)