Skip to content

Commit

Permalink
Update the headers for ImageMagick 6.8.9.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeWey committed May 10, 2014
1 parent cb46d8c commit 85c2cab
Show file tree
Hide file tree
Showing 18 changed files with 273 additions and 36 deletions.
43 changes: 26 additions & 17 deletions dmagick/Image.d
Original file line number Diff line number Diff line change
Expand Up @@ -2263,21 +2263,6 @@ class Image
DMagickException.throwException(&(imageRef.exception));
}

/**
* Applies a radial blur to the image.
*
* Params:
* angle = The angle of the radial blur, in degrees.
* channel = If no channels are specified, blurs all the channels.
*/
void radialBlur(double angle, ChannelType channel = ChannelType.DefaultChannels)
{
MagickCoreImage* image =
RadialBlurImageChannel(imageRef, channel, angle, DMagickExceptionInfo());

imageRef = ImageRef(image);
}

/**
* Creates a simulated three-dimensional button-like effect by
* lightening and darkening the edges of the image.
Expand Down Expand Up @@ -2441,9 +2426,8 @@ class Image
* storage = The pixel Staroage type (CharPixel,
* ShortPixel, IntegerPixel, FloatPixel, or DoublePixel).
* pixels = The pixel data.
* Bugs: DMD bug 2972 prevents readpixels from being named just read.
*/
void readPixels(T)(size_t width, size_t height, string map, T[] pixels)
void read(T)(size_t width, size_t height, string map, T[] pixels)
{
StorageType storage = getStorageType!(T);

Expand Down Expand Up @@ -2565,6 +2549,31 @@ class Image
imageRef = ImageRef(image);
}

/**
* Applies a rotational blur to the image.
*
* Params:
* angle = The angle of the rotational blur, in degrees.
* channel = If no channels are specified, blurs all the channels.
*/
void rotationalBlur(double angle, ChannelType channel = ChannelType.DefaultChannels)
{
static if ( is(typeof(RotationalBlurImage)) )
{
MagickCoreImage* image =
RotationalBlurImageChannel(imageRef, channel, angle, DMagickExceptionInfo());
}
else
{
MagickCoreImage* image =
RadialBlurImageChannel(imageRef, channel, angle, DMagickExceptionInfo());
}

imageRef = ImageRef(image);
}
/** ditto */
alias rotationalBlur radialBlur;

/**
* scales an image to the desired dimensions with pixel sampling.
* Unlike other scaling methods, this method does not introduce any
Expand Down
17 changes: 17 additions & 0 deletions dmagick/c/accelerate.d
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
module dmagick.c.accelerate;

import dmagick.c.colorspace;
import dmagick.c.composite;
import dmagick.c.exception;
import dmagick.c.fx;
import dmagick.c.geometry;
import dmagick.c.image;
import dmagick.c.magickType;
import dmagick.c.magickVersion;
import dmagick.c.morphology;
import dmagick.c.pixel;
import dmagick.c.statistic;

extern(C)
{
MagickBooleanType AccelerateConvolveImage(const(Image)*, const(KernelInfo)*, Image*, ExceptionInfo*);

static if ( MagickLibVersion >= 0x689 )
{
MagickBooleanType AccelerateCompositeImage(Image*, const ChannelType, const CompositeOperator, const(Image)*, const ssize_t, const ssize_t, const float, const float, ExceptionInfo*);
MagickBooleanType AccelerateContrastStretchImageChannel(Image*, const ChannelType, const double, const double, ExceptionInfo*);
MagickBooleanType AccelerateGrayscaleImage(Image*, const PixelIntensityMethod, ExceptionInfo*);
MagickBooleanType AccelerateNegateImageChannel(Image*, const ChannelType, const MagickBooleanType, ExceptionInfo*);
MagickBooleanType AccelerateRandomImage(Image*, ExceptionInfo*);
}

static if ( MagickLibVersion >= 0x688 )
{
MagickBooleanType AccelerateContrastImage(Image*, const MagickBooleanType, ExceptionInfo*);
Expand All @@ -31,4 +43,9 @@ extern(C)
{
Image* AccelerateConvolveImageChannel(const(Image)*, const ChannelType, const(KernelInfo)*, ExceptionInfo*);
}

static if ( MagickLibVersion >= 0x689 )
{
Image* AccelerateMotionBlurImage(const Image*, const ChannelType, const(double)*, const size_t, const(OffsetInfo)*, ExceptionInfo*);
}
}
3 changes: 2 additions & 1 deletion dmagick/c/compare.d
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ extern(C)
RootMeanSquaredErrorMetric,
NormalizedCrossCorrelationErrorMetric,
FuzzErrorMetric,
UndefinedErrorMetric = 0
UndefinedErrorMetric = 0,
PerceptualHashErrorMetric = 0xff
}

double* GetImageChannelDistortions(Image*, const(Image)*, const MetricType, ExceptionInfo*);
Expand Down
12 changes: 10 additions & 2 deletions dmagick/c/constitute.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module dmagick.c.constitute;
import dmagick.c.exception;
import dmagick.c.image;
import dmagick.c.magickType;
import dmagick.c.magickVersion;

extern(C)
{
Expand All @@ -28,9 +29,16 @@ extern(C)
Image* ReadImages(const(ImageInfo)*, ExceptionInfo*);
Image* ReadInlineImage(const(ImageInfo)*, const(char)*, ExceptionInfo*);

MagickBooleanType ConstituteComponentGenesis();

static if ( MagickLibVersion < 0x689 )
{
MagickBooleanType ConstituteComponentGenesis();
}
MagickBooleanType WriteImage(const(ImageInfo)*, Image*);
MagickBooleanType WriteImages(const(ImageInfo)*, Image*, const(char)*, ExceptionInfo*);

void ConstituteComponentTerminus();
static if ( MagickLibVersion < 0x689 )
{
void ConstituteComponentTerminus();
}
}
50 changes: 50 additions & 0 deletions dmagick/c/deprecate.d
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ deprecated extern(C)
alias MagickOffsetType ExtendedSignedIntegralType;
alias MagickSizeType ExtendedUnsignedIntegralType;
alias MagickRealType ExtendedRationalType;
/// The Quantum depth ImageMagick / DMagick is compiled with.
alias MagickQuantumDepth MAGICKCORE_QUANTUM_DEPTH;

static if ( MagickLibVersion >= 0x689 )
{
enum MagickRealType MagickHuge = 3.4e+38;
}

struct ViewInfo {}

Expand Down Expand Up @@ -107,6 +114,12 @@ deprecated extern(C)
Image* MosaicImages(Image*, ExceptionInfo*);
Image* PopImageList(Image**);

static if ( MagickLibVersion >= 0x689 )
{
Image* RadialBlurImage(const(Image)*, const double, ExceptionInfo*);
Image* RadialBlurImageChannel(const(Image)*, const ChannelType, const double, ExceptionInfo*);
}

static if ( MagickLibVersion >= 0x661 )
{
Image* RecolorImage(const(Image)*, const size_t, const(double)*, ExceptionInfo*);
Expand Down Expand Up @@ -140,6 +153,12 @@ deprecated extern(C)
MagickBooleanType ClipPathImage(Image*, const(char)*, const MagickBooleanType);
MagickBooleanType CloneImageAttributes(Image*, const(Image)*);
MagickBooleanType ColorFloodfillImage(Image*, const(DrawInfo)*, const PixelPacket, const ssize_t, const ssize_t, const PaintMethod);

static if ( MagickLibVersion >= 0x689 )
{
MagickBooleanType ConstituteComponentGenesis();
}

MagickBooleanType DeleteImageAttribute(Image*, const(char)*);
MagickBooleanType DeleteMagickRegistry(const ssize_t);
MagickBooleanType DescribeImage(Image*, FILE*, const MagickBooleanType);
Expand All @@ -153,7 +172,20 @@ deprecated extern(C)

MagickBooleanType FuzzyColorCompare(const(Image)*, const(PixelPacket)*, const(PixelPacket)*);
MagickBooleanType FuzzyOpacityCompare(const(Image)*, const(PixelPacket)*, const(PixelPacket)*);

static if (MagickLibVersion >= 0x689)
{
MagickBooleanType InitializeModuleList(ExceptionInfo*);
MagickBooleanType IsMagickInstantiated();
}

MagickBooleanType LevelImageColors(Image*, const ChannelType, const(MagickPixelPacket)*, const(MagickPixelPacket)*, const MagickBooleanType);

static if ( MagickLibVersion >= 0x689 )
{
MagickBooleanType LoadMimeLists(const(char)*, ExceptionInfo*);
}

MagickBooleanType MagickMonitor(const(char)*, const MagickOffsetType, const MagickSizeType, void*);
MagickBooleanType MapImage(Image*, const(Image)*, const MagickBooleanType);
MagickBooleanType MapImages(Image*, const(Image)*, const MagickBooleanType);
Expand Down Expand Up @@ -220,7 +252,19 @@ deprecated extern(C)
uint UnshiftImageList(Image**, const(Image)*, ExceptionInfo*);

void* AcquireMemory(const size_t);

static if ( MagickLibVersion >= 0x689 )
{
void AcquireSemaphoreInfo(SemaphoreInfo**);
}

void AllocateNextImage(const(ImageInfo)*, Image*);

static if ( MagickLibVersion >= 0x689 )
{
void ConstituteComponentTerminus();
}

void* CloneMemory(void*, const(void)*, const size_t);

static if ( MagickLibVersion >= 0x655 )
Expand All @@ -243,6 +287,12 @@ deprecated extern(C)
void InitializeMagick(const(char)*);
void MagickIncarnate(const(char)*);
void ReacquireMemory(void**, const size_t);

static if ( MagickLibVersion >= 0x689 )
{
void RelinquishSemaphoreInfo(SemaphoreInfo*);
}

void ResetImageAttributeIterator(const(Image)*);
void SetCacheThreshold(const size_t);
void SetImage(Image*, const Quantum);
Expand Down
20 changes: 18 additions & 2 deletions dmagick/c/effect.d
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ extern(C)
Image* AdaptiveSharpenImageChannel(const(Image)*, const ChannelType, const double, const double, ExceptionInfo*);
Image* BlurImage(const(Image)*, const double, const double, ExceptionInfo*);
Image* BlurImageChannel(const(Image)*, const ChannelType, const double, const double, ExceptionInfo*);

static if ( MagickLibVersion >= 0x689 )
{
Image* CannyEdgeImage(const(Image)*, const double, const double, const double, const double, ExceptionInfo*);
}

Image* ConvolveImage(const(Image)*, const size_t, const(double)*, ExceptionInfo*);
Image* ConvolveImageChannel(const(Image)*, const ChannelType, const size_t, const(double)*, ExceptionInfo*);
Image* DespeckleImage(const(Image)*, ExceptionInfo*);
Expand All @@ -74,8 +80,18 @@ extern(C)
Image* MotionBlurImage(const(Image)*, const double, const double, const double, ExceptionInfo*);
Image* MotionBlurImageChannel(const(Image)*, const ChannelType, const double, const double, const double, ExceptionInfo*);
Image* PreviewImage(const(Image)*, const PreviewType, ExceptionInfo*);
Image* RadialBlurImage(const(Image)*, const double, ExceptionInfo*);
Image* RadialBlurImageChannel(const(Image)*, const ChannelType, const double, ExceptionInfo*);

static if ( MagickLibVersion < 0x689 )
{
Image* RadialBlurImage(const(Image)*, const double, ExceptionInfo*);
Image* RadialBlurImageChannel(const(Image)*, const ChannelType, const double, ExceptionInfo*);
}

static if ( MagickLibVersion >= 0x689 )
{
Image* RotationalBlurImage(const(Image)*, const double, ExceptionInfo*);
Image* RotationalBlurImageChannel(const(Image)*, const ChannelType, const double, ExceptionInfo*);
}

static if ( MagickLibVersion < 0x669 )
{
Expand Down
7 changes: 7 additions & 0 deletions dmagick/c/exception.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module dmagick.c.exception;
import core.vararg;

import dmagick.c.magickType;
import dmagick.c.magickVersion;
import dmagick.c.semaphore;

extern(C)
Expand Down Expand Up @@ -117,6 +118,12 @@ extern(C)
ErrorHandler SetErrorHandler(ErrorHandler);

ExceptionInfo* AcquireExceptionInfo();

static if ( MagickLibVersion >= 0x669 )
{
ExceptionInfo* CloneExceptionInfo(ExceptionInfo*);
}

ExceptionInfo* DestroyExceptionInfo(ExceptionInfo*);

FatalErrorHandler SetFatalErrorHandler(FatalErrorHandler);
Expand Down
6 changes: 6 additions & 0 deletions dmagick/c/image.d
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,12 @@ extern(C)
PixelIntensityMethod
intensity; /* method to generate an intensity value from a pixel */
}

static if ( MagickLibVersion >= 0x689 )
{
/** Total animation duration sum(delay*iterations) */
size_t duration;
}
}

struct ImageInfo
Expand Down
10 changes: 10 additions & 0 deletions dmagick/c/log.d
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ extern(C)

struct LogInfo {}

static if (MagickLibVersion >= 0x689)
{
alias void function(const LogEventType, const(char)*) MagickLogMethod;
}

char** GetLogList(const(char)*, size_t*, ExceptionInfo*);

const(char)* GetLogName();
Expand All @@ -84,4 +89,9 @@ extern(C)
void CloseMagickLog();
void LogComponentTerminus();
void SetLogFormat(const(char)*);

static if (MagickLibVersion >= 0x689)
{
void SetLogMethod(MagickLogMethod);
}
}
19 changes: 18 additions & 1 deletion dmagick/c/magick.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import dmagick.c.exception;
import dmagick.c.image;
import dmagick.c.magickType;
import dmagick.c.magickVersion;
import dmagick.c.semaphore;

extern(C)
{
Expand Down Expand Up @@ -77,6 +78,12 @@ extern(C)
char*
mime_type;
}

static if (MagickLibVersion >= 0x689)
{
SemaphoreInfo*
semaphore;
}
}

char** GetMagickList(const(char)*, size_t*, ExceptionInfo*);
Expand All @@ -101,7 +108,17 @@ extern(C)
MagickBooleanType GetMagickEndianSupport(const(MagickInfo)*);
MagickBooleanType GetMagickRawSupport(const(MagickInfo)*);
MagickBooleanType GetMagickSeekableStream(const(MagickInfo)*);
MagickBooleanType IsMagickInstantiated();

static if (MagickLibVersion < 0x689)
{
MagickBooleanType IsMagickInstantiated();
}

static if (MagickLibVersion >= 0x689)
{
MagickBooleanType IsMagickCoreInstantiated();
}

MagickBooleanType MagickComponentGenesis();
MagickBooleanType UnregisterMagickInfo(const(char)*);

Expand Down
7 changes: 7 additions & 0 deletions dmagick/c/magickDelegate.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import core.stdc.stdio;
import dmagick.c.exception;
import dmagick.c.image;
import dmagick.c.magickType;
import dmagick.c.magickVersion;
import dmagick.c.semaphore;

alias ptrdiff_t ssize_t;

Expand Down Expand Up @@ -32,6 +34,11 @@ extern(C)

size_t
signature;

static if ( MagickLibVersion >= 0x689 )
{
SemaphoreInfo* semaphore;
}
}

char* GetDelegateCommand(const(ImageInfo)*, Image*, const(char)*, const(char)*, ExceptionInfo*);
Expand Down
Loading

0 comments on commit 85c2cab

Please sign in to comment.