1 module dmagick.c.threshold;
2 
3 import core.stdc.stdio;
4 
5 import dmagick.c.exception;
6 import dmagick.c.image;
7 import dmagick.c.magickType;
8 import dmagick.c.magickVersion;
9 
10 alias ptrdiff_t ssize_t;
11 
12 extern(C)
13 {
14 	static if ( MagickLibVersion >= 0x699 )
15 	{
16 		enum AutoThresholdMethod
17 		{
18 			UndefinedThresholdMethod,
19 			KapurThresholdMethod,
20 			OTSUThresholdMethod,
21 			TriangleThresholdMethod
22 		}
23 	}
24 
25 	struct ThresholdMap {}
26 
27 	Image* AdaptiveThresholdImage(const(Image)*, const size_t, const size_t, const ssize_t, ExceptionInfo*);
28 
29 	ThresholdMap* DestroyThresholdMap(ThresholdMap*);
30 	ThresholdMap* GetThresholdMap(const(char)*, ExceptionInfo*);
31 
32 	static if ( MagickLibVersion >= 0x699 )
33 	{
34 		MagickBooleanType AutoThresholdImage(Image*, const AutoThresholdMethod, ExceptionInfo*);
35 	}
36 
37 	MagickBooleanType BilevelImage(Image*, const double);
38 	MagickBooleanType BilevelImageChannel(Image*, const ChannelType, const double);
39 	MagickBooleanType BlackThresholdImage(Image*, const(char)*);
40 	MagickBooleanType BlackThresholdImageChannel(Image*, const ChannelType, const(char)*, ExceptionInfo*);
41 	MagickBooleanType ClampImage(Image*);
42 	MagickBooleanType ClampImageChannel(Image*, const ChannelType);
43 	MagickBooleanType ListThresholdMaps(FILE*, ExceptionInfo*);
44 	MagickBooleanType OrderedDitherImage(Image*);
45 	MagickBooleanType OrderedDitherImageChannel(Image*, const ChannelType, ExceptionInfo*);
46 	MagickBooleanType OrderedPosterizeImage(Image*, const(char)*, ExceptionInfo*);
47 	MagickBooleanType OrderedPosterizeImageChannel(Image*, const ChannelType, const(char)*, ExceptionInfo*);
48 
49 	static if ( MagickLibVersion >= 0x681 )
50 	{
51 		MagickBooleanType PerceptibleImage(Image*, const double);
52 		MagickBooleanType PerceptibleImageChannel(Image*, const ChannelType, const double);
53 	}
54 
55 	MagickBooleanType RandomThresholdImage(Image*, const(char)*, ExceptionInfo*);
56 	MagickBooleanType RandomThresholdImageChannel(Image*, const ChannelType, const(char)*, ExceptionInfo*);
57 	MagickBooleanType WhiteThresholdImage(Image*, const(char)*);
58 	MagickBooleanType WhiteThresholdImageChannel(Image*, const ChannelType, const(char)*, ExceptionInfo *);
59 }