From d88d0f52048e8fcc0c8b54563d7c079e3b71a436 Mon Sep 17 00:00:00 2001 From: Cristy Date: Wed, 17 Apr 2019 20:03:28 -0400 Subject: [PATCH] Add MagickAutoThresholdImage(), MagickCannyEdgeImage(), MagickComplexImages(), MagickConnectedComponentsImage(), MagickHoughLineImage(), MagickKuwaharaImage(), MagickLevelizeImageColors(), MagickLevelImageColors(), MagickMeanShiftImage(), MagickPolynomialImage(), MagickRangeThresholdImage(), MagickSetSeed(), MagickWaveletDenoiseImage() methods to MagickWand API --- MagickCore/feature.c | 13 +- MagickCore/statistic.c | 1 - MagickWand/magick-image.c | 389 +++++++++++++++++++++++++++++++++-- MagickWand/magick-image.h | 8 + MagickWand/magick-property.c | 29 ++- MagickWand/magick-property.h | 3 + 6 files changed, 423 insertions(+), 20 deletions(-) diff --git a/MagickCore/feature.c b/MagickCore/feature.c index ef607b9fe..a0205ba15 100644 --- a/MagickCore/feature.c +++ b/MagickCore/feature.c @@ -1726,12 +1726,13 @@ MagickExport ChannelFeatures *GetImageFeatures(const Image *image, % recommand Canny) to identify lines in the image. The algorithm accumulates % counts for every white pixel for every possible orientation (for angles from % 0 to 179 in 1 degree increments) and distance from the center of the image to -% the corner (in 1 px increments) and stores the counts in an accumulator matrix -% of angle vs distance. The size of the accumulator is 180x(diagonal/2). Next -% it searches this space for peaks in counts and converts the locations of the -% peaks to slope and intercept in the normal x,y input image space. Use the -% slope/intercepts to find the endpoints clipped to the bounds of the image. The -% lines are then drawn. The counts are a measure of the length of the lines +% the corner (in 1 px increments) and stores the counts in an accumulator +% matrix of angle vs distance. The size of the accumulator is 180x(diagonal/2). +% Next it searches this space for peaks in counts and converts the locations +% of the peaks to slope and intercept in the normal x,y input image space. Use +% the slope/intercepts to find the endpoints clipped to the bounds of the +% image. The lines are then drawn. The counts are a measure of the length of +% the lines. % % The format of the HoughLineImage method is: % diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c index 504999dc4..a649880f4 100644 --- a/MagickCore/statistic.c +++ b/MagickCore/statistic.c @@ -2168,7 +2168,6 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image, % o exception: return any errors or warnings in this structure. % */ - MagickExport Image *PolynomialImage(const Image *images, const size_t number_terms,const double *terms,ExceptionInfo *exception) { diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c index fb73d9f22..623467555 100644 --- a/MagickWand/magick-image.c +++ b/MagickWand/magick-image.c @@ -1349,31 +1349,32 @@ WandExport MagickBooleanType MagickChopImage(MagickWand *wand, % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% MagickCLAHEImage() selects an individual threshold for each pixel -% based on the range of intensity values in its local neighborhood. This -% allows for thresholding of an image whose global intensity histogram -% doesn't contain distinctive peaks. +% MagickCLAHEImage() is a variant of adaptive histogram equalization in which +% the contrast amplification is limited, so as to reduce this problem of noise +% amplification. % % The format of the CLAHEImage method is: % % MagickBooleanType MagickCLAHEImage(MagickWand *wand,const size_t width, -% const size_t height,const double bias,const double sans) +% const size_t height,const double number_bins,const double clip_limit) % % A description of each parameter follows: % % o wand: the magick wand. % -% o width: the width of the local neighborhood. +% o width: the width of the tile divisions to use in horizontal direction. % -% o height: the height of the local neighborhood. +% o height: the height of the tile divisions to use in vertical direction. % -% o offset: the mean bias. +% o number_bins: number of bins for histogram ("dynamic range"). % -% o sans: not used. +% o clip_limit: contrast limit for localised changes in contrast. A limit +% less than 1 results in standard non-contrast limited AHE. % */ WandExport MagickBooleanType MagickCLAHEImage(MagickWand *wand, - const size_t width,const size_t height,const double bias,const double sans) + const size_t width,const size_t height,const double number_bins, + const double clip_limit) { MagickBooleanType status; @@ -1384,7 +1385,8 @@ WandExport MagickBooleanType MagickCLAHEImage(MagickWand *wand, (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if (wand->images == (Image *) NULL) ThrowWandException(WandError,"ContainsNoImages",wand->name); - status=CLAHEImage(wand->images,width,height,bias,sans,wand->exception); + status=CLAHEImage(wand->images,width,height,(size_t) number_bins,clip_limit, + wand->exception); return(status); } @@ -2217,6 +2219,56 @@ WandExport MagickBooleanType MagickCompositeLayers(MagickWand *wand, % % % % % % +% M a g i c k C o n n e c t e d C o m p o n e n t s I m a g e % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% MagickConnectedComponentsImage() returns the connected-components of the +% image uniquely labeled. The returned connected components image colors +% member defines the number of unique objects. Choose from 4 or 8-way +% connectivity. +% +% The format of the MagickConnectedComponentsImage method is: +% +% MagickBooleanType MagickConnectedComponentsImage(MagickWand *wand, +% const size_t connectivity,CCObjectInfo **objects) +% +% A description of each parameter follows: +% +% o wand: the magick wand. +% +% o connectivity: how many neighbors to visit, choose from 4 or 8. +% +% o objects: return the attributes of each unique object. +% +*/ +WandExport MagickBooleanType MagickConnectedComponentsImage(MagickWand *wand, + const size_t connectivity,CCObjectInfo **objects) +{ + Image + *connected_components_image; + + assert(wand != (MagickWand *) NULL); + assert(wand->signature == MagickWandSignature); + if (wand->debug != MagickFalse) + (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); + if (wand->images == (Image *) NULL) + ThrowWandException(WandError,"ContainsNoImages",wand->name); + connected_components_image=ConnectedComponentsImage(wand->images,connectivity, + objects,wand->exception); + if (connected_components_image == (Image *) NULL) + return(MagickFalse); + ReplaceImageInList(&wand->images,connected_components_image); + return(MagickTrue); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % M a g i c k C o n t r a s t I m a g e % % % % % @@ -6198,6 +6250,63 @@ WandExport MagickBooleanType MagickHasPreviousImage(MagickWand *wand) % % % % % % +% M a g i c k H o u g h L i n e I m a g e % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Use MagickHoughLineImage() in conjunction with any binary edge extracted +% image (we recommand Canny) to identify lines in the image. The algorithm +% accumulates counts for every white pixel for every possible orientation (for +% angles from 0 to 179 in 1 degree increments) and distance from the center of +% the image to the corner (in 1 px increments) and stores the counts in an +% accumulator matrix of angle vs distance. The size of the accumulator is +% 180x(diagonal/2). Next it searches this space for peaks in counts and +% converts the locations of the peaks to slope and intercept in the normal x,y +% input image space. Use the slope/intercepts to find the endpoints clipped to +% the bounds of the image. The lines are then drawn. The counts are a measure +% of the length of the lines. +% +% The format of the MagickHoughLineImage method is: +% +% MagickBooleanType MagickHoughLineImage(MagickWand *wand, +% const size_t width,const size_t height,const size_t threshold) +% +% A description of each parameter follows: +% +% o wand: the magick wand. +% +% o width, height: find line pairs as local maxima in this neighborhood. +% +% o threshold: the line count threshold. +% +*/ +WandExport MagickBooleanType MagickHoughLineImage(MagickWand *wand, + const size_t width,const size_t height,const size_t threshold) +{ + Image + *lines_image; + + assert(wand != (MagickWand *) NULL); + assert(wand->signature == MagickWandSignature); + if (wand->debug != MagickFalse) + (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); + if (wand->images == (Image *) NULL) + ThrowWandException(WandError,"ContainsNoImages",wand->name); + lines_image=HoughLineImage(wand->images,width,height,threshold, + wand->exception); + if (lines_image == (Image *) NULL) + return(MagickFalse); + ReplaceImageInList(&wand->images,lines_image); + return(MagickTrue); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % M a g i c k I d e n t i f y I m a g e % % % % % @@ -6533,6 +6642,52 @@ WandExport MagickBooleanType MagickInverseFourierTransformImage( % % % % % % +% M a g i c k K u w a h a r a I m a g e % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Use MagickKuwaharaImage() is an edge preserving noise reduction filter. +% +% The format of the MagickKuwaharaImage method is: +% +% MagickBooleanType MagickKuwaharaImage(MagickWand *wand, +% const double radius,const double sigma) +% +% A description of each parameter follows: +% +% o wand: the magick wand. +% +% o radius: the square window radius. +% +% o sigma: the standard deviation of the Gaussian, in pixels. +% +*/ +WandExport MagickBooleanType MagickKuwaharaImage(MagickWand *wand, + const double radius,const double sigma) +{ + Image + *kuwahara_image; + + assert(wand != (MagickWand *) NULL); + assert(wand->signature == MagickWandSignature); + if (wand->debug != MagickFalse) + (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); + if (wand->images == (Image *) NULL) + ThrowWandException(WandError,"ContainsNoImages",wand->name); + kuwahara_image=KuwaharaImage(wand->images,radius,sigma,wand->exception); + if (kuwahara_image == (Image *) NULL) + return(MagickFalse); + ReplaceImageInList(&wand->images,kuwahara_image); + return(MagickTrue); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % M a g i c k L a b e l I m a g e % % % % % @@ -6869,6 +7024,63 @@ WandExport MagickBooleanType MagickMagnifyImage(MagickWand *wand) % % % % % % +% M a g i c k M e a n S h i f t I m a g e % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% MagickMeanShiftImage() elineate arbitrarily shaped clusters in the image. For +% each pixel, it visits all the pixels in the neighborhood specified by +% the window centered at the pixel and excludes those that are outside the +% radius=(window-1)/2 surrounding the pixel. From those pixels, it finds those +% that are within the specified color distance from the current mean, and +% computes a new x,y centroid from those coordinates and a new mean. This new +% x,y centroid is used as the center for a new window. This process iterates +% until it converges and the final mean is replaces the (original window +% center) pixel value. It repeats this process for the next pixel, etc., +% until it processes all pixels in the image. Results are typically better with +% colorspaces other than sRGB. We recommend YIQ, YUV or YCbCr. +% +% The format of the MagickMeanShiftImage method is: +% +% MagickBooleanType MagickMeanShiftImage(MagickWand *wand, +% const size_t number_terms,const double *terms) +% +% A description of each parameter follows: +% +% o wand: the magick wand. +% +% o width, height: find pixels in this neighborhood. +% +% o color_distance: the color distance. +% +*/ +WandExport MagickBooleanType MagickMeanShiftImage(MagickWand *wand, + const size_t width,const size_t height,const double color_distance) +{ + Image + *mean_image; + + assert(wand != (MagickWand *) NULL); + assert(wand->signature == MagickWandSignature); + if (wand->debug != MagickFalse) + (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); + if (wand->images == (Image *) NULL) + ThrowWandException(WandError,"ContainsNoImages",wand->name); + mean_image=MeanShiftImage(wand->images,width,height,color_distance, + wand->exception); + if (mean_image == (Image *) NULL) + return(MagickFalse); + ReplaceImageInList(&wand->images,mean_image); + return(MagickTrue); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % M a g i c k M e r g e I m a g e L a y e r s % % % % % @@ -7948,6 +8160,57 @@ WandExport MagickBooleanType MagickPolaroidImage(MagickWand *wand, % % % % % % +% M a g i c k P o l y n o m i a l I m a g e % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% MagickPolynomialImage() returns an image where each pixel is the sum of the +% pixels in the image sequence after applying its corresponding terms +% (coefficient and degree pairs). +% +% The format of the MagickPolynomialImage method is: +% +% MagickBooleanType MagickPolynomialImage(MagickWand *wand, +% const size_t number_terms,const double *terms) +% +% A description of each parameter follows: +% +% o wand: the magick wand. +% +% o number_terms: the number of terms in the list. The actual list length +% is 2 x number_terms + 1 (the constant). +% +% o terms: the list of polynomial coefficients and degree pairs and a +% constant. +% +*/ +WandExport MagickBooleanType MagickPolynomialImage(MagickWand *wand, + const size_t number_terms,const double *terms) +{ + Image + *polynomial_image; + + assert(wand != (MagickWand *) NULL); + assert(wand->signature == MagickWandSignature); + if (wand->debug != MagickFalse) + (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); + if (wand->images == (Image *) NULL) + ThrowWandException(WandError,"ContainsNoImages",wand->name); + polynomial_image=PolynomialImage(wand->images,number_terms,terms, + wand->exception); + if (polynomial_image == (Image *) NULL) + return(MagickFalse); + ReplaceImageInList(&wand->images,polynomial_image); + return(MagickTrue); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % M a g i c k P o s t e r i z e I m a g e % % % % % @@ -8254,6 +8517,56 @@ WandExport MagickBooleanType MagickQuantizeImages(MagickWand *wand, % % % % % % +% M a g i c k R a n g e T h r e s h o l d I m a g e % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% MagickRangeThresholdImage() applies soft and hard thresholding. +% +% The format of the RangeThresholdImage method is: +% +% MagickBooleanType MagickRangeThresholdImage(MagickWand *wand, +% const double low_black,const double low_white,const double high_white, +% const double high_black) +% +% A description of each parameter follows: +% +% o wand: the magick wand. +% +% o low_black: Define the minimum threshold value. +% +% o low_white: Define the maximum threshold value. +% +% o high_white: Define the minimum threshold value. +% +% o low_white: Define the maximum threshold value. +% +*/ +WandExport MagickBooleanType MagickRangeThresholdImage(MagickWand *wand, + const double low_black,const double low_white,const double high_white, + const double high_black) +{ + MagickBooleanType + status; + + assert(wand != (MagickWand *) NULL); + assert(wand->signature == MagickWandSignature); + if (wand->debug != MagickFalse) + (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); + if (wand->images == (Image *) NULL) + ThrowWandException(WandError,"ContainsNoImages",wand->name); + status=RangeThresholdImage(wand->images,low_black,low_white, + high_white,high_black,wand->exception); + return(status); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % M a g i c k R o t a t i o n a l B l u r I m a g e % % % % % @@ -11576,7 +11889,7 @@ WandExport MagickBooleanType MagickSpliceImage(MagickWand *wand, % % MagickBooleanType MagickSpreadImage(MagickWand *wand, % const PixelInterpolateMethod method,const double radius) -% +% % A description of each parameter follows: % % o wand: the magick wand. @@ -12520,6 +12833,58 @@ WandExport MagickBooleanType MagickWaveImage(MagickWand *wand, % % % % % % +% M a g i c k W a v e l e t D e n o i s e I m a g e % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% MagickWaveletDenoiseImage() removes noise from the image using a wavelet +% transform. The wavelet transform is a fast hierarchical scheme for +% processing an image using a set of consecutive lowpass and high_pass filters, +% followed by a decimation. This results in a decomposition into different +% scales which can be regarded as different “frequency bands”, determined by +% the mother wavelet. +% +% The format of the MagickWaveletDenoiseImage method is: +% +% MagickBooleanType MagickWaveletDenoiseImage(MagickWand *wand, +% const double threshold,const double softness) +% +% A description of each parameter follows: +% +% o wand: the magick wand. +% +% o threshold: set the threshold for smoothing. +% +% o softness: attenuate the smoothing threshold. +% +*/ +WandExport MagickBooleanType MagickWaveletDenoiseImage(MagickWand *wand, + const double threshold,const double softness) +{ + Image + *noise_image; + + assert(wand != (MagickWand *) NULL); + assert(wand->signature == MagickWandSignature); + if (wand->debug != MagickFalse) + (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); + if (wand->images == (Image *) NULL) + ThrowWandException(WandError,"ContainsNoImages",wand->name); + noise_image=WaveletDenoiseImage(wand->images,threshold,softness, + wand->exception); + if (noise_image == (Image *) NULL) + return(MagickFalse); + ReplaceImageInList(&wand->images,noise_image); + return(MagickTrue); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % M a g i c k W h i t e T h r e s h o l d I m a g e % % % % % diff --git a/MagickWand/magick-image.h b/MagickWand/magick-image.h index f00ca8ae2..a66e2f205 100644 --- a/MagickWand/magick-image.h +++ b/MagickWand/magick-image.h @@ -120,6 +120,7 @@ extern WandExport MagickBooleanType const CompositeOperator,const GravityType), MagickCompositeLayers(MagickWand *,const MagickWand *,const CompositeOperator, const ssize_t,const ssize_t), + MagickConnectedComponentsImage(MagickWand *,const size_t,CCObjectInfo **), MagickConstituteImage(MagickWand *,const size_t,const size_t,const char *, const StorageType,const void *), MagickContrastImage(MagickWand *,const MagickBooleanType), @@ -181,6 +182,7 @@ extern WandExport MagickBooleanType MagickHaldClutImage(MagickWand *,const MagickWand *), MagickHasNextImage(MagickWand *), MagickHasPreviousImage(MagickWand *), + MagickHoughLineImage(MagickWand *,const size_t,const size_t,const size_t), MagickImplodeImage(MagickWand *,const double,const PixelInterpolateMethod), MagickImportImagePixels(MagickWand *,const ssize_t,const ssize_t,const size_t, const size_t,const char *,const StorageType,const void *), @@ -188,6 +190,7 @@ extern WandExport MagickBooleanType const PixelInterpolateMethod), MagickInverseFourierTransformImage(MagickWand *,MagickWand *, const MagickBooleanType), + MagickKuwaharaImage(MagickWand *,const double,const double), MagickLabelImage(MagickWand *,const char *), MagickLevelImage(MagickWand *,const double,const double,const double), MagickLevelizeImage(MagickWand *,const double,const double,const double), @@ -196,6 +199,7 @@ extern WandExport MagickBooleanType const double), MagickLocalContrastImage(MagickWand *,const double,const double), MagickMagnifyImage(MagickWand *), + MagickMeanShiftImage(MagickWand *,const size_t,const size_t,const double), MagickMedianConvolveImage(MagickWand *,const double), MagickMinifyImage(MagickWand *), MagickModeImage(MagickWand *,const double), @@ -212,6 +216,7 @@ extern WandExport MagickBooleanType const double,const MagickBooleanType), MagickOptimizeImageTransparency(MagickWand *), MagickOrderedDitherImage(MagickWand *,const char *), + MagickPolynomialImage(MagickWand *,const size_t,const double *), MagickTransparentPaintImage(MagickWand *,const PixelWand *, const double,const double,const MagickBooleanType invert), MagickPingImage(MagickWand *,const char *), @@ -225,6 +230,8 @@ extern WandExport MagickBooleanType const size_t,const DitherMethod,const MagickBooleanType), MagickQuantizeImages(MagickWand *,const size_t,const ColorspaceType, const size_t,const DitherMethod,const MagickBooleanType), + MagickRangeThresholdImage(MagickWand *,const double,const double, + const double,const double), MagickRotationalBlurImage(MagickWand *,const double), MagickRaiseImage(MagickWand *,const size_t,const size_t,const ssize_t, const ssize_t,const MagickBooleanType), @@ -327,6 +334,7 @@ extern WandExport MagickBooleanType const ssize_t), MagickWaveImage(MagickWand *,const double,const double, const PixelInterpolateMethod), + MagickWaveletDenoiseImage(MagickWand *,const double,const double), MagickWhiteThresholdImage(MagickWand *,const PixelWand *), MagickWriteImage(MagickWand *,const char *), MagickWriteImageFile(MagickWand *,FILE *), diff --git a/MagickWand/magick-property.c b/MagickWand/magick-property.c index 20973d468..1b42f9f00 100644 --- a/MagickWand/magick-property.c +++ b/MagickWand/magick-property.c @@ -2858,6 +2858,34 @@ WandExport MagickBooleanType MagickSetSamplingFactors(MagickWand *wand, % % % % % % +% M a g i c k S e t S e e d % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% MagickSetSeed() sets the pseudo-random number generator seed. Use it to +% generate a pedictable sequence of random numbers. +% +% The format of the MagickSetSeed method is: +% +% void MagickSetSeed(const unsigned long seed) +% +% A description of each parameter follows: +% +% o seed: the seed. +% +*/ +WandExport void MagickSetSeed(const unsigned long seed) +{ + SetRandomSecretKey(seed); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % M a g i c k S e t S e c u r i t y P o l i c y % % % % % @@ -3018,7 +3046,6 @@ WandExport MagickBooleanType MagickSetType(MagickWand *wand, assert(wand->signature == MagickWandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - wand->image_info->type=image_type; return(MagickTrue); } diff --git a/MagickWand/magick-property.h b/MagickWand/magick-property.h index fb8b0cfa1..c7898475b 100644 --- a/MagickWand/magick-property.h +++ b/MagickWand/magick-property.h @@ -136,6 +136,9 @@ extern WandExport unsigned char *MagickGetImageProfile(MagickWand *,const char *,size_t *), *MagickRemoveImageProfile(MagickWand *,const char *,size_t *); +extern WandExport void + MagickSetSeed(const unsigned long); + #if defined(__cplusplus) || defined(c_plusplus) } #endif -- 2.40.0