97 #define ThresholdsFilename "thresholds.xml" 120 #if MAGICKCORE_ZERO_CONFIGURATION_SUPPORT 121 #include "MagickCore/threshold-map.h" 123 static const char *
const 125 "<?xml version=\"1.0\"?>" 127 " <threshold map=\"threshold\" alias=\"1x1\">" 128 " <description>Threshold 1x1 (non-dither)</description>" 129 " <levels width=\"1\" height=\"1\" divisor=\"2\">" 133 " <threshold map=\"checks\" alias=\"2x1\">" 134 " <description>Checkerboard 2x1 (dither)</description>" 135 " <levels width=\"2\" height=\"2\" divisor=\"3\">" 184 const size_t width,
const size_t height,
const double bias,
187 #define AdaptiveThresholdImageTag "AdaptiveThreshold/Image" 211 assert(image != (
Image *) NULL);
218 if (threshold_image == (
Image *) NULL)
219 return((
Image *) NULL);
220 if ((width == 0) || (height == 0))
221 return(threshold_image);
226 return((
Image *) NULL);
236 #if defined(MAGICKCORE_OPENMP_SUPPORT) 237 #pragma omp parallel for schedule(static) shared(progress,status) \ 238 magick_number_threads(image,threshold_image,image->rows,1) 240 for (y=0; y < (ssize_t) image->
rows; y++)
265 (height/2L),image->
columns+width,height,exception);
290 channel_bias[channel]=0.0;
291 channel_sum[channel]=0.0;
292 for (v=0; v < (ssize_t) height; v++)
294 for (u=0; u < (ssize_t) width; u++)
296 if (u == (ssize_t) (width-1))
297 channel_bias[channel]+=pixels[i];
298 channel_sum[channel]+=pixels[i];
304 for (x=0; x < (ssize_t) image->
columns; x++)
323 channel_sum[channel]-=channel_bias[channel];
324 channel_bias[channel]=0.0;
326 for (v=0; v < (ssize_t) height; v++)
328 channel_bias[channel]+=pixels[i];
330 channel_sum[channel]+=pixels[i];
333 mean=(double) (channel_sum[channel]/number_pixels+bias);
347 #if defined(MAGICKCORE_OPENMP_SUPPORT) 362 return(threshold_image);
397 #define MaxIntensity 255 401 *cumulative_histogram,
418 sizeof(*cumulative_histogram));
420 sizeof(*black_entropy));
422 sizeof(*white_entropy));
423 if ((cumulative_histogram == (
double *) NULL) ||
424 (black_entropy == (
double *) NULL) || (white_entropy == (
double *) NULL))
426 if (white_entropy != (
double *) NULL)
428 if (black_entropy != (
double *) NULL)
430 if (cumulative_histogram != (
double *) NULL)
431 cumulative_histogram=(
double *)
440 cumulative_histogram[0]=histogram[0];
442 cumulative_histogram[i]=cumulative_histogram[i-1]+histogram[i];
449 black_entropy[j]=0.0;
450 if (cumulative_histogram[j] > epsilon)
453 for (i=0; i <= j; i++)
454 if (histogram[i] > epsilon)
455 entropy-=histogram[i]/cumulative_histogram[j]*
456 log(histogram[i]/cumulative_histogram[j]);
457 black_entropy[j]=entropy;
462 white_entropy[j]=0.0;
463 if ((1.0-cumulative_histogram[j]) > epsilon)
467 if (histogram[i] > epsilon)
468 entropy-=histogram[i]/(1.0-cumulative_histogram[j])*
469 log(histogram[i]/(1.0-cumulative_histogram[j]));
470 white_entropy[j]=entropy;
476 maximum_entropy=black_entropy[0]+white_entropy[0];
479 if ((black_entropy[j]+white_entropy[j]) > maximum_entropy)
481 maximum_entropy=black_entropy[j]+white_entropy[j];
482 threshold=(size_t) j;
513 sizeof(*probability));
515 if ((myu == (
double *) NULL) || (omega == (
double *) NULL) ||
516 (probability == (
double *) NULL) || (sigma == (
double *) NULL))
518 if (sigma != (
double *) NULL)
520 if (probability != (
double *) NULL)
522 if (omega != (
double *) NULL)
524 if (myu != (
double *) NULL)
534 probability[i]=histogram[i];
538 omega[0]=probability[0];
542 omega[i]=omega[i-1]+probability[i];
543 myu[i]=myu[i-1]+i*probability[i];
553 if ((omega[i] != 0.0) && (omega[i] != 1.0))
554 sigma[i]=pow(myu[
MaxIntensity]*omega[i]-myu[i],2.0)/(omega[i]*(1.0-
556 if (sigma[i] > max_sigma)
559 threshold=(double) i;
602 if (histogram[i] > 0.0)
609 if (histogram[i] > 0.0)
617 if (histogram[i] > count)
628 if ((max-start) >= (end-max))
633 c=(-1.0)*(a*x1+b*y1);
634 inverse_ratio=1.0/sqrt(a*a+b*b+c*c);
637 if (x2 == (
double) start)
638 for (i=start; i < max; i++)
640 segment=inverse_ratio*(a*i+b*histogram[i]+c);
641 distance=sqrt(segment*segment);
642 if ((distance > max_distance) && (segment > 0.0))
645 max_distance=distance;
649 for (i=end; i > max; i--)
651 segment=inverse_ratio*(a*i+b*histogram[i]+c);
652 distance=sqrt(segment*segment);
653 if ((distance > max_distance) && (segment < 0.0))
656 max_distance=distance;
689 assert(image != (
Image *) NULL);
695 if (histogram == (
double *) NULL)
699 (void) memset(histogram,0,(
MaxIntensity+1UL)*
sizeof(*histogram));
701 for (y=0; y < (ssize_t) image->
rows; y++)
710 if (p == (
const Quantum *) NULL)
712 for (x=0; x < (ssize_t) image->
columns; x++)
728 histogram[i]=gamma*histogram[i];
760 (void)
SetImageProperty(image,
"auto-threshold:threshold",property,exception);
810 #define ThresholdImageTag "Threshold/Image" 824 assert(image != (
Image *) NULL);
838 #if defined(MAGICKCORE_OPENMP_SUPPORT) 839 #pragma omp parallel for schedule(static) shared(progress,status) \ 840 magick_number_threads(image,image,image->rows,1) 842 for (y=0; y < (ssize_t) image->
rows; y++)
858 for (x=0; x < (ssize_t) image->
columns; x++)
886 #if defined(MAGICKCORE_OPENMP_SUPPORT) 932 #define ThresholdImageTag "Threshold/Image" 955 assert(image != (
Image *) NULL);
959 if (thresholds == (
const char *) NULL)
967 threshold.
red=geometry_info.
rho;
969 threshold.
blue=geometry_info.
rho;
971 threshold.
alpha=100.0;
975 threshold.
blue=geometry_info.
xi;
999 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1000 #pragma omp parallel for schedule(static) shared(progress,status) \ 1001 magick_number_threads(image,image,image->rows,1) 1003 for (y=0; y < (ssize_t) image->
rows; y++)
1019 for (x=0; x < (ssize_t) image->
columns; x++)
1035 pixel=(double) q[i];
1048 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1091 #define ClampImageTag "Clamp/Image" 1105 assert(image != (
Image *) NULL);
1118 for (i=0; i < (ssize_t) image->
colors; i++)
1134 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1135 #pragma omp parallel for schedule(static) shared(progress,status) \ 1136 magick_number_threads(image,image,image->rows,1) 1138 for (y=0; y < (ssize_t) image->
rows; y++)
1154 for (x=0; x < (ssize_t) image->
columns; x++)
1176 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1223 #define ThresholdImageTag "Threshold/Image" 1244 assert(image != (
Image *) NULL);
1251 start=(*start_color);
1322 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1323 #pragma omp parallel for schedule(static) shared(progress,status) \ 1324 magick_number_threads(image,image,image->rows,1) 1326 for (y=0; y < (ssize_t) image->
rows; y++)
1342 for (x=0; x < (ssize_t) image->
columns; x++)
1370 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1410 if (map->
map_id != (
char *) NULL)
1414 if (map->
levels != (ssize_t *) NULL)
1455 #if !MAGICKCORE_ZERO_CONFIGURATION_SUPPORT 1535 "Loading threshold map file \"%s\" ...",filename);
1545 if ((attribute != (
char *) NULL) && (
LocaleCompare(map_id,attribute) == 0))
1548 if ((attribute != (
char *) NULL) && (
LocaleCompare(map_id,attribute) == 0))
1560 "XmlMissingElement",
"<description>, map \"%s\"",map_id);
1568 "XmlMissingElement",
"<levels>, map \"%s\"", map_id);
1573 map->
map_id=(
char *) NULL;
1575 map->
levels=(ssize_t *) NULL;
1577 if (attribute != (
char *) NULL)
1580 if (content != (
char *) NULL)
1583 if (attribute == (
char *) NULL)
1586 "XmlMissingAttribute",
"<levels width>, map \"%s\"",map_id);
1592 if (map->
width == 0)
1595 "XmlInvalidAttribute",
"<levels width>, map \"%s\"",map_id);
1601 if (attribute == (
char *) NULL)
1604 "XmlMissingAttribute",
"<levels height>, map \"%s\"",map_id);
1613 "XmlInvalidAttribute",
"<levels height>, map \"%s\"",map_id);
1619 if (attribute == (
char *) NULL)
1622 "XmlMissingAttribute",
"<levels divisor>, map \"%s\"",map_id);
1631 "XmlInvalidAttribute",
"<levels divisor>, map \"%s\"",map_id);
1637 if (content == (
char *) NULL)
1640 "XmlMissingContent",
"<levels>, map \"%s\"",map_id);
1647 if (map->
levels == (ssize_t *) NULL)
1649 for (i=0; i < (ssize_t) (map->
width*map->
height); i++)
1651 map->
levels[i]=(ssize_t) strtol(content,&p,10);
1655 "XmlInvalidContent",
"<level> too few values, map \"%s\"",map_id);
1663 "XmlInvalidContent",
"<level> %.20g out of range, map \"%s\"",
1664 (double) map->
levels[i],map_id);
1671 value=(double) strtol(content,&p,10);
1676 "XmlInvalidContent",
"<level> too many values, map \"%s\"",map_id);
1728 assert( xml != (
char *) NULL );
1729 assert( file != (FILE *) NULL );
1731 "Loading threshold map file \"%s\" ...",filename);
1735 (void)
FormatLocaleFile(file,
"%-16s %-12s %s\n",
"Map",
"Alias",
"Description");
1737 "----------------------------------------------------\n");
1743 if (map == (
char *) NULL)
1746 "XmlMissingAttribute",
"<map>");
1755 "XmlMissingElement",
"<description>, map \"%s\"",map);
1760 if (content == (
char *) NULL)
1763 "XmlMissingContent",
"<description>, map \"%s\"", map);
1812 if (file == (FILE *) NULL)
1816 "\n Threshold Maps for Ordered Dither Operations\n");
1879 #define DitherImageTag "Dither/Image" 1908 assert(image != (
Image *) NULL);
1914 if (threshold_map == (
const char *) NULL)
1916 p=(
char *) threshold_map;
1917 while (((isspace((
int) ((
unsigned char) *p)) != 0) || (*p ==
',')) &&
1921 while (((isspace((
int) ((
unsigned char) *p)) == 0) && (*p !=
',')) &&
1926 token[p-threshold_map]=(*p);
1929 token[p-threshold_map]=
'\0';
1934 "InvalidArgument",
"%s : '%s'",
"ordered-dither",threshold_map);
1939 p=strchr((
char *) threshold_map,
',');
1940 if ((p != (
char *) NULL) && (isdigit((
int) ((
unsigned char) *(++p))) != 0))
1954 if (fabs(levels[i]) >= 1)
1961 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1962 #pragma omp parallel for schedule(static) shared(progress,status) \ 1963 magick_number_threads(image,image,image->rows,1) 1965 for (y=0; y < (ssize_t) image->
rows; y++)
1981 for (x=0; x < (ssize_t) image->
columns; x++)
2006 level=threshold/(map->
divisor-1);
2007 threshold-=level*(map->
divisor-1);
2022 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2067 const double epsilon)
2072 sign=(double) quantum < 0.0 ? -1.0 : 1.0;
2073 if ((sign*quantum) >= epsilon)
2075 return((
Quantum) (sign*epsilon));
2081 #define PerceptibleImageTag "Perceptible/Image" 2095 assert(image != (
Image *) NULL);
2108 for (i=0; i < (ssize_t) image->
colors; i++)
2128 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2129 #pragma omp parallel for schedule(static) shared(progress,status) \ 2130 magick_number_threads(image,image,image->rows,1) 2132 for (y=0; y < (ssize_t) image->
rows; y++)
2148 for (x=0; x < (ssize_t) image->
columns; x++)
2170 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2215 const double min_threshold,
const double max_threshold,
ExceptionInfo *exception)
2217 #define ThresholdImageTag "Threshold/Image" 2237 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2242 assert(image != (
Image *) NULL);
2258 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2260 #pragma omp parallel for schedule(static) shared(progress,status) \ 2261 magick_number_threads(image,image,image->rows,key == ~0UL) 2263 for (y=0; y < (ssize_t) image->
rows; y++)
2282 for (x=0; x < (ssize_t) image->
columns; x++)
2296 if ((
double) q[i] < min_threshold)
2297 threshold=min_threshold;
2299 if ((
double) q[i] > max_threshold)
2300 threshold=max_threshold;
2315 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2365 const double low_black,
const double low_white,
const double high_white,
2368 #define ThresholdImageTag "Threshold/Image" 2382 assert(image != (
Image *) NULL);
2396 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2397 #pragma omp parallel for schedule(static) shared(progress,status) \ 2398 magick_number_threads(image,image,image->rows,1) 2400 for (y=0; y < (ssize_t) image->
rows; y++)
2416 for (x=0; x < (ssize_t) image->
columns; x++)
2432 pixel=(double) q[i];
2433 if (pixel < low_black)
2436 if ((pixel >= low_black) && (pixel < low_white))
2440 if ((pixel >= low_white) && (pixel <= high_white))
2443 if ((pixel > high_white) && (pixel <= high_black))
2445 high_black-high_white)*(high_black-pixel));
2447 if (pixel > high_black)
2461 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2507 #define ThresholdImageTag "Threshold/Image" 2530 assert(image != (
Image *) NULL);
2534 if (thresholds == (
const char *) NULL)
2542 threshold.
red=geometry_info.
rho;
2544 threshold.
blue=geometry_info.
rho;
2546 threshold.
alpha=100.0;
2550 threshold.
blue=geometry_info.
xi;
2574 #if defined(MAGICKCORE_OPENMP_SUPPORT) 2575 #pragma omp parallel for schedule(static) shared(progress,status) \ 2576 magick_number_threads(image,image,image->rows,1) 2578 for (y=0; y < (ssize_t) image->
rows; y++)
2594 for (x=0; x < (ssize_t) image->
columns; x++)
2610 pixel=(double) q[i];
2623 #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 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 RandomInfo ** DestroyRandomInfoThreadSet(RandomInfo **random_info)
static double StringToDouble(const char *magick_restrict string, char **magick_restrict sentinal)
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 RandomInfo ** AcquireRandomInfoThreadSet(void)
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)
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,...)
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)
MagickPrivate void ConvertRGBToLab(const double, const double, const double, double *, double *, double *)
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 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)