Make MagickMax()/MagickMin() a macro rather than an inline.

This commit is contained in:
cristy
2014-12-25 18:05:31 +00:00
parent 043a981a1f
commit badc7524ff
59 changed files with 3 additions and 675 deletions
-7
View File
@@ -708,13 +708,6 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
%
*/
static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
{
if (x > y)
return(x);
return(y);
}
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
-7
View File
@@ -1619,13 +1619,6 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info,
%
*/
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static char *EscapeParenthesis(const char *text)
{
char
-8
View File
@@ -533,14 +533,6 @@ MagickExport size_t GetImageDepth(const Image *image,ExceptionInfo *exception)
% a maximum of MAGICKCORE_QUANTUM_DEPTH.
%
*/
static inline double MagickMin(const double x,const double y)
{
if (x < y)
return(x);
return(y);
}
MagickExport size_t GetImageQuantumDepth(const Image *image,
const MagickBooleanType constrain)
{
-9
View File
@@ -235,15 +235,6 @@ MagickExport void AttachBlob(BlobInfo *blob_info,const void *blob,
% o exception: return any errors or warnings in this structure.
%
*/
static inline MagickSizeType MagickMin(const MagickSizeType x,
const MagickSizeType y)
{
if (x < y)
return(x);
return(y);
}
MagickExport MagickBooleanType BlobToFile(char *filename,const void *blob,
const size_t length,ExceptionInfo *exception)
{
-8
View File
@@ -471,14 +471,6 @@ MagickPrivate void ClonePixelCacheMethods(Cache clone,const Cache cache)
%
*/
static inline MagickSizeType MagickMin(const MagickSizeType x,
const MagickSizeType y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType ClonePixelCacheRepository(
CacheInfo *restrict clone_info,CacheInfo *restrict cache_info,
ExceptionInfo *exception)
-7
View File
@@ -113,13 +113,6 @@ typedef enum
TransferChannelOp
} ChannelFx;
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType ChannelImage(Image *destination_image,
const PixelChannel destination_channel,const ChannelFx channel_op,
const Image *source_image,const PixelChannel source_channel,
-7
View File
@@ -534,13 +534,6 @@ static inline void IncrementCipherNonce(const size_t length,
ThrowFatalException(ResourceLimitFatalError,"Sequence wrap error `%s'");
}
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
MagickExport MagickBooleanType DecipherImage(Image *image,
const char *passphrase,ExceptionInfo *exception)
{
-8
View File
@@ -1657,14 +1657,6 @@ static MagickBooleanType IsColorCacheInstantiated(ExceptionInfo *exception)
% o q: Pixel q.
%
*/
static inline double MagickMax(const double x,const double y)
{
if (x > y)
return(x);
return(y);
}
MagickPrivate MagickBooleanType IsEquivalentAlpha(const Image *image,
const PixelInfo *p,const PixelInfo *q)
{
-9
View File
@@ -101,15 +101,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMax(const size_t x,
const size_t y)
{
if (x > y)
return(x);
return(y);
}
MagickExport MagickBooleanType AcquireImageColormap(Image *image,
const size_t colors,ExceptionInfo *exception)
{
-14
View File
@@ -338,13 +338,6 @@ MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image,
%
*/
static inline double MagickMax(const double x,const double y)
{
if (x > y)
return(x);
return(y);
}
static MagickBooleanType GetAbsoluteDistortion(const Image *image,
const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
@@ -1682,13 +1675,6 @@ static double GetSimilarityMetric(const Image *image,const Image *reference,
return(distortion);
}
static inline double MagickMin(const double x,const double y)
{
if (x < y)
return(x);
return(y);
}
MagickExport Image *SimilarityImage(Image *image,const Image *reference,
const MetricType metric,const double similarity_threshold,
RectangleInfo *offset,double *similarity_metric,ExceptionInfo *exception)
-16
View File
@@ -178,22 +178,6 @@
operations.
*/
static inline MagickRealType MagickMin(const MagickRealType x,
const MagickRealType y)
{
if (x < y)
return(x);
return(y);
}
static inline MagickRealType MagickMax(const MagickRealType x,
const MagickRealType y)
{
if (x > y)
return(x);
return(y);
}
static void HCLComposite(const MagickRealType hue,const MagickRealType chroma,
const MagickRealType luma,MagickRealType *red,MagickRealType *green,
MagickRealType *blue)
-15
View File
@@ -363,21 +363,6 @@ MagickExport void Ascii85Encode(Image *image,const unsigned char code)
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
MagickExport MagickBooleanType HuffmanDecodeImage(Image *image,
ExceptionInfo *exception)
{
-14
View File
@@ -1802,20 +1802,6 @@ MagickExport MagickBooleanType RemoteDisplayCommand(const ImageInfo *image_info,
%
*/
static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
{
if (x > y)
return(x);
return(y);
}
static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType XAnnotateEditImage(Display *display,
XResourceInfo *resource_info,XWindows *windows,Image *image,
ExceptionInfo *exception)
-9
View File
@@ -77,15 +77,6 @@
/*
Numerous internal routines for image distortions.
*/
static inline double MagickMin(const double x,const double y)
{
return( x < y ? x : y);
}
static inline double MagickMax(const double x,const double y)
{
return( x > y ? x : y);
}
static inline void AffineArgsToCoefficients(double *affine)
{
/* map external sx,ry,rx,sy,tx,ty to internal c0,c2,c4,c1,c3,c5 */
-21
View File
@@ -1059,27 +1059,6 @@ static AffineMatrix InverseAffineMatrix(const AffineMatrix *affine)
return(inverse_affine);
}
static inline ssize_t MagickAbsoluteValue(const ssize_t x)
{
if (x < 0)
return(-x);
return(x);
}
static inline double MagickMax(const double x,const double y)
{
if (x > y)
return(x);
return(y);
}
static inline double MagickMin(const double x,const double y)
{
if (x < y)
return(x);
return(y);
}
MagickExport MagickBooleanType DrawAffineImage(Image *image,
const Image *source,const AffineMatrix *affine,ExceptionInfo *exception)
{
-17
View File
@@ -1922,23 +1922,6 @@ MagickExport MagickBooleanType GammaImage(Image *image,const double gamma,
% o exception: return any errors or warnings in this structure.
%
*/
static inline MagickRealType MagickMax(const MagickRealType x,
const MagickRealType y)
{
if (x > y)
return(x);
return(y);
}
static inline MagickRealType MagickMin(const MagickRealType x,
const MagickRealType y)
{
if (x < y)
return(x);
return(y);
}
MagickExport MagickBooleanType GrayscaleImage(Image *image,
const PixelIntensityMethod method,ExceptionInfo *exception)
{
-7
View File
@@ -609,13 +609,6 @@ MagickExport Image *CannyEdgeImage(const Image *image,const double radius,
%
*/
static inline ssize_t MagickAbsoluteValue(const ssize_t x)
{
if (x < 0)
return(-x);
return(x);
}
static inline double MagickLog10(const double x)
{
#define Log10Epsilon (1.0e-11)
-7
View File
@@ -1108,13 +1108,6 @@ MagickPrivate FxInfo *DestroyFxInfo(FxInfo *fx_info)
%
*/
static inline double MagickMax(const double x,const double y)
{
if (x > y)
return(x);
return(y);
}
static double FxChannelStatistics(FxInfo *fx_info,Image *image,
PixelChannel channel,const char *symbol,ExceptionInfo *exception)
{
-15
View File
@@ -847,21 +847,6 @@ MagickPrivate void ConvertLCHuvToRGB(const double luma,const double chroma,
% component of the HCL color space.
%
*/
static inline double MagickMax(const double x,const double y)
{
if (x > y)
return(x);
return(y);
}
static inline double MagickMin(const double x,const double y)
{
if (x < y)
return(x);
return(y);
}
MagickPrivate void ConvertRGBToHCL(const double red,const double green,
const double blue,double *hue,double *chroma,double *luma)
{
+3
View File
@@ -22,6 +22,9 @@
extern "C" {
#endif
#define MagickAbsoluteValue(x) ((x) < 0 ? -(x) : (x))
#define MagickMax(x,y) (((x) > (y)) ? (x) : (y))
#define MagickMin(x,y) (((x) < (y)) ? (x) : (y))
#define Magick2PI 6.28318530717958647692528676655900576839433879875020
#define MagickPHI 1.61803398874989484820458683436563811772030917980576
#define MagickPI 3.14159265358979323846264338327950288419716939937510
-14
View File
@@ -285,20 +285,6 @@ static void GetMontageGeometry(char *geometry,const size_t number_images,
*tiles_per_row=(size_t) ceil((double) number_images/(*tiles_per_column));
}
static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
{
if (x > y)
return(x);
return(y);
}
static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
{
if (x < y)
return(x);
return(y);
}
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
-8
View File
@@ -89,14 +89,6 @@
/*
Other global definitions used by module.
*/
static inline double MagickMin(const double x,const double y)
{
return( x < y ? x : y);
}
static inline double MagickMax(const double x,const double y)
{
return( x > y ? x : y);
}
#define Minimize(assign,value) assign=MagickMin(assign,value)
#define Maximize(assign,value) assign=MagickMax(assign,value)
-6
View File
@@ -405,12 +405,6 @@ MagickExport MagickBooleanType FloodfillPaintImage(Image *image,
% o exception: return any errors or warnings in this structure.
%
*/
static inline double MagickMax(const double x,const double y)
{
return(x > y ? x : y);
}
MagickExport MagickBooleanType GradientImage(Image *image,
const GradientType type,const SpreadMethod method,
const PixelInfo *start_color,const PixelInfo *stop_color,
-17
View File
@@ -2217,23 +2217,6 @@ MagickExport void GetPixelInfo(const Image *image,PixelInfo *pixel)
% o pixel: Specifies a pointer to a Quantum structure.
%
*/
static inline MagickRealType MagickMax(const MagickRealType x,
const MagickRealType y)
{
if (x > y)
return(x);
return(y);
}
static inline MagickRealType MagickMin(const MagickRealType x,
const MagickRealType y)
{
if (x < y)
return(x);
return(y);
}
MagickExport MagickRealType GetPixelIntensity(const Image *restrict image,
const Quantum *restrict pixel)
{
-14
View File
@@ -487,20 +487,6 @@ static MagickBooleanType GetIPTCProperty(const Image *image,const char *key,
return(MagickTrue);
}
static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
{
if (x > y)
return(x);
return(y);
}
static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
{
if (x < y)
return(x);
return(y);
}
static inline int ReadPropertyByte(const unsigned char **p,size_t *length)
{
int
-14
View File
@@ -1926,20 +1926,6 @@ static MagickBooleanType RiemersmaDither(Image *image,CacheView *image_view,
return(MagickTrue);
}
static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
{
if (x > y)
return(x);
return(y);
}
static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType DitherImage(Image *image,CubeInfo *cube_info,
ExceptionInfo *exception)
{
-14
View File
@@ -2383,20 +2383,6 @@ static ContributionInfo **AcquireContributionThreadSet(const size_t count)
return(contribution);
}
static inline double MagickMax(const double x,const double y)
{
if (x > y)
return(x);
return(y);
}
static inline double MagickMin(const double x,const double y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType HorizontalFilter(const ResizeFilter *resize_filter,
const Image *image,Image *resize_image,const double x_factor,
const MagickSizeType span,MagickOffsetType *offset,ExceptionInfo *exception)
-22
View File
@@ -696,28 +696,6 @@ static MagickBooleanType Classify(Image *image,short **extrema,
% in the zero_crossing array.
%
*/
static inline ssize_t MagickAbsoluteValue(const ssize_t x)
{
if (x < 0)
return(-x);
return(x);
}
static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
{
if (x > y)
return(x);
return(y);
}
static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
{
if (x < y)
return(x);
return(y);
}
static void ConsolidateCrossings(ZeroCrossing *zero_crossing,
const size_t number_crossings)
{
-21
View File
@@ -225,13 +225,6 @@ static int IntensityCompare(const void *x,const void *y)
}
#endif
static inline double MagickMin(const double x,const double y)
{
if (x < y)
return(x);
return(y);
}
static double ApplyEvaluateOperator(RandomInfo *random_info,const Quantum pixel,
const MagickEvaluateOperator op,const double value)
{
@@ -2915,20 +2908,6 @@ static inline void InsertPixelList(const Quantum pixel,PixelList *pixel_list)
AddNodePixelList(pixel_list,index);
}
static inline double MagickAbsoluteValue(const double x)
{
if (x < 0)
return(-x);
return(x);
}
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static void ResetPixelList(PixelList *pixel_list)
{
int
-16
View File
@@ -1144,22 +1144,6 @@ MagickPrivate void XBestPixel(Display *display,const Colormap colormap,
% o resource_info: Specifies a pointer to a X11 XResourceInfo structure.
%
*/
static inline int MagickMax(const int x,const int y)
{
if (x > y)
return(x);
return(y);
}
static inline size_t MagickMin(const unsigned int x,
const unsigned int y)
{
if (x < y)
return(x);
return(y);
}
MagickPrivate XVisualInfo *XBestVisualInfo(Display *display,
XStandardColormap *map_info,XResourceInfo *resource_info)
{
-7
View File
@@ -381,13 +381,6 @@ static inline MagickBooleanType IsPathWritable(const char *path)
return(MagickTrue);
}
static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
{
if (x > y)
return(x);
return(y);
}
static MagickBooleanType MonitorProgress(const char *text,
const MagickOffsetType offset,const MagickSizeType extent,
void *wand_unused(client_data))
-22
View File
@@ -185,28 +185,6 @@ static MagickBooleanType
% the decoding process.
%
*/
static inline ssize_t MagickAbsoluteValue(const ssize_t x)
{
if (x < 0)
return(-x);
return(x);
}
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType DecodeImage(Image *image,const size_t compression,
unsigned char *pixels)
{
-8
View File
@@ -159,14 +159,6 @@ ModuleExport void UnregisterCIPImage(void)
% o exception: return any errors or warnings in this structure.
%
*/
static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType WriteCIPImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
-15
View File
@@ -2675,21 +2675,6 @@ static MagickBooleanType IsDCM(const unsigned char *magick,const size_t length)
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
typedef struct _DCMStreamInfo
{
size_t
-23
View File
@@ -143,14 +143,6 @@ static MagickBooleanType
% the decoding process.
%
*/
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType DecodeImage(Image *image,
const MagickBooleanType compression,unsigned char *pixels)
{
@@ -441,21 +433,6 @@ static MagickBooleanType IsDIB(const unsigned char *magick,const size_t length)
% o exception: return any errors or warnings in this structure.
%
*/
static inline ssize_t MagickAbsoluteValue(const ssize_t x)
{
if (x < 0)
return(-x);
return(x);
}
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
DIBInfo
-15
View File
@@ -917,21 +917,6 @@ static ssize_t ReadBlobBlock(Image *image,unsigned char *data)
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType PingGIFImage(Image *image,ExceptionInfo *exception)
{
unsigned char
-8
View File
@@ -171,14 +171,6 @@ ModuleExport void UnregisterHISTOGRAMImage(void)
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
-8
View File
@@ -86,14 +86,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static Image *ReadINLINEImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
-7
View File
@@ -1878,13 +1878,6 @@ static void InitializeDestination(j_compress_ptr cinfo)
destination->manager.free_in_buffer=MaxBufferExtent;
}
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static void TerminateDestination(j_compress_ptr cinfo)
{
DestinationManager
-8
View File
@@ -594,14 +594,6 @@ UnlinkFile:
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image *image, *image2=NULL,
-14
View File
@@ -185,20 +185,6 @@ static voidpf AcquireZIPMemory(voidpf context,unsigned int items,
}
#endif
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static void PushRunlengthPacket(Image *image,const unsigned char *pixels,
size_t *length,PixelInfo *pixel,ExceptionInfo *exception)
{
-15
View File
@@ -366,21 +366,6 @@ ModuleExport void UnregisterMPEGImage(void)
% o exception: return any errors or warnings in this structure.
%
*/
static inline double MagickMax(const double x,const double y)
{
if (x > y)
return(x);
return(y);
}
static inline double MagickMin(const double x,const double y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType CopyDelegateFile(const char *source,
const char *destination)
{
-15
View File
@@ -229,21 +229,6 @@ static ssize_t FindColor(PixelInfo *packet)
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
{
if (x < y)
return(x);
return(y);
}
static Image *ReadPALMImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
-8
View File
@@ -385,14 +385,6 @@ static MagickBooleanType IsPCD(const unsigned char *magick,const size_t length)
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static Image *OverviewImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
-22
View File
@@ -197,28 +197,6 @@ static MagickBooleanType IsPCX(const unsigned char *magick,const size_t length)
% o exception: return any errors or warnings in this structure.
%
*/
static inline ssize_t MagickAbsoluteValue(const ssize_t x)
{
if (x < 0)
return(-x);
return(x);
}
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define ThrowPCXException(severity,tag) \
-14
View File
@@ -952,20 +952,6 @@ ModuleExport void UnregisterPDFImage(void)
%
*/
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static char *EscapeParenthesis(const char *text)
{
register char
-8
View File
@@ -778,14 +778,6 @@ static MagickBooleanType IsPICT(const unsigned char *magick,const size_t length)
%
*/
static inline size_t MagickMax(const size_t x,
const size_t y)
{
if (x > y)
return(x);
return(y);
}
static MagickBooleanType ReadRectangle(Image *image,PICTRectangle *rectangle)
{
rectangle->top=(short) ReadBlobMSBShort(image);
-7
View File
@@ -91,13 +91,6 @@
%
*/
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static inline void PlasmaPixel(Image *image,RandomInfo *random_info,double x,
double y,ExceptionInfo *exception)
{
-16
View File
@@ -1038,14 +1038,6 @@ Magick_RenderingIntentString_from_PNG_RenderingIntent(const int ping_intent)
}
}
static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
{
if (x > y)
return(x);
return(y);
}
static const char *
Magick_ColorType_from_PNG_ColorType(const int ping_colortype)
{
@@ -1071,14 +1063,6 @@ Magick_ColorType_from_PNG_ColorType(const int ping_colortype)
}
}
static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
{
if (x < y)
return(x);
return(y);
}
#endif /* PNG_LIBPNG_VER > 10011 */
#endif /* MAGICKCORE_PNG_DELEGATE */
-7
View File
@@ -1143,13 +1143,6 @@ ModuleExport void UnregisterPSImage(void)
%
*/
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static inline unsigned char *PopHexPixel(const char **hex_digits,
const size_t pixel,unsigned char *pixels)
{
-7
View File
@@ -500,13 +500,6 @@ static inline size_t GetPSDRowSize(Image *image)
return(image->columns*GetPSDPacketSize(image));
}
static inline ssize_t MagickAbsoluteValue(const ssize_t x)
{
if (x < 0)
return(-x);
return(x);
}
static const char *ModeToString(PSDImageType type)
{
switch (type)
-8
View File
@@ -124,14 +124,6 @@ static MagickBooleanType IsRLE(const unsigned char *magick,const size_t length)
%
%
*/
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define SkipLinesOp 0x01
-7
View File
@@ -164,13 +164,6 @@ static MagickBooleanType IsSGI(const unsigned char *magick,const size_t length)
%
*/
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType SGIDecode(const size_t bytes_per_pixel,
ssize_t number_packets,unsigned char *packets,ssize_t number_pixels,
unsigned char *pixels)
-9
View File
@@ -87,15 +87,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMin(const size_t x,
const size_t y)
{
if (x < y)
return(x);
return(y);
}
static Image *ReadSTEGANOImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
-8
View File
@@ -654,14 +654,6 @@ ModuleExport void UnregisterTGAImage(void)
% o image: The image.
%
*/
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static inline void WriteTGAPixel(Image *image,TGAImageType image_type,
const Quantum *p,const QuantumAny range,const double midpoint)
{
-16
View File
@@ -499,20 +499,6 @@ static MagickBooleanType DecodeLabImage(Image *image,ExceptionInfo *exception)
return(status);
}
static inline size_t MagickMax(const size_t x,const size_t y)
{
if (x > y)
return(x);
return(y);
}
static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType ReadProfile(Image *image,const char *name,
unsigned char *datum,ssize_t length,ExceptionInfo *exception)
{
@@ -1435,8 +1421,6 @@ RestoreMSCWarning
samples_per_pixel);
if (compress_tag == COMPRESSION_JBIG)
method=ReadStripMethod;
if ((photometric != PHOTOMETRIC_SEPARATED) &&
if (TIFFIsTiled(tiff) != MagickFalse)
method=ReadTileMethod;
quantum_info->endian=LSBEndian;
-8
View File
@@ -841,14 +841,6 @@ ModuleExport void UnregisterVIFFImage(void)
% o exception: return any errors or warnings in this structure.
%
*/
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static MagickBooleanType WriteVIFFImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
-7
View File
@@ -287,13 +287,6 @@ static CompositeOperator GIMPBlendModeToCompositeOperator(
%
*/
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static char *ReadBlobStringWithLongSize(Image *image,char *string,size_t max,
ExceptionInfo *exception)
{
-7
View File
@@ -172,13 +172,6 @@ static char *NextXPMLine(char *p)
return(p);
}
static inline size_t MagickMin(const size_t x,const size_t y)
{
if (x < y)
return(x);
return(y);
}
static char *ParseXPMColor(char *color,MagickBooleanType search_start)
{
#define NumberTargets 6