// Written by: Paul Mrozowski
//             Senior Applications Developer
//     
//             Kirtland Associates, Inc.
//             1220 Morse
//             Suite 200
//             Royal Oak, MI 48067
//             Phone: 248.542.2675
//
//             Email: pcm@kirtlandsys.com
//
// MagickCOM.idl : IDL source for MagickCOM.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (MagickCOM.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";

interface IImageCollection;

	[
		object,
		uuid(5C6D6667-0614-4E85-801D-2ED93CEF2C19),
		dual,
		helpstring("IImage Interface"),
		pointer_default(unique)
	]
    

	interface IImage : IDispatch
	{
		//Standard Server Side Component Methods
		HRESULT OnStartPage([in] IUnknown* piUnk);
		HRESULT OnEndPage();	
		[id(1), helpstring("method Resize")] HRESULT Resize(BSTR cFilename, BSTR cOutput, [out, retval] VARIANT_BOOL *pVal);
		[propget, id(2), helpstring("property ImageWidth")] HRESULT ImageWidth([out, retval] unsigned int *pVal);
		[propput, id(2), helpstring("property ImageWidth")] HRESULT ImageWidth([in] unsigned int newVal);
		[propget, id(3), helpstring("property ImageHeight")] HRESULT ImageHeight([out, retval] unsigned int *pVal);
		[propput, id(3), helpstring("property ImageHeight")] HRESULT ImageHeight([in] unsigned int newVal);
        [id(4), helpstring("method Read")] HRESULT Read([in] BSTR cFilename, [out, retval] VARIANT_BOOL *pVal);
		[propget, id(5), helpstring("property ErrorMsg")] HRESULT ErrorMsg([out, retval] BSTR *pVal);
		[propput, id(5), helpstring("property ErrorMsg")] HRESULT ErrorMsg([in] BSTR newVal);
		[id(6), helpstring("method InitMagick")] HRESULT InitMagick(BSTR cPath);
		[propget, id(7), helpstring("property Columns")] HRESULT Columns([out, retval] unsigned int *pVal);		
		[propget, id(8), helpstring("property Rows")] HRESULT Rows([out, retval] unsigned int *pVal);		
		[id(9), helpstring("method Scale")] HRESULT Scale(unsigned int x, unsigned int y, [out, retval] VARIANT_BOOL *pVal);
		[id(10), helpstring("method Sample")] HRESULT Sample(unsigned int x, unsigned int y, VARIANT_BOOL *pVal);
		[id(11), helpstring("method Write")] HRESULT Write(BSTR cFilename, [out, retval] VARIANT_BOOL *pVal);
		[id(12), helpstring("method Rotate")] HRESULT Rotate(double Degrees, [out, retval] VARIANT_BOOL *pVal);
		[id(13), helpstring("method Flip")] HRESULT Flip([out, retval] VARIANT_BOOL *pVal);
		[id(14), helpstring("method Enhance")] HRESULT Enhance([out, retval] VARIANT_BOOL *pVal);
		[id(15), helpstring("method Equalize")] HRESULT Equalize([out, retval] VARIANT_BOOL *pVal);
		[id(16), helpstring("method Flop")] HRESULT Flop([out, retval] VARIANT_BOOL *pVal);
		[id(17), helpstring("method Normalize")] HRESULT Normalize([out, retval] VARIANT_BOOL *pVal);
		[id(18), helpstring("method Despeckle")] HRESULT Despeckle([out, retval] VARIANT_BOOL *pVal);
		[id(19), helpstring("method Contrast")] HRESULT Contrast(unsigned int sharpen, [out, retval] VARIANT_BOOL *pVal);
		[id(20), helpstring("method Edge")] HRESULT Edge(unsigned int radius, [out, retval] VARIANT_BOOL *pVal);
		[id(21), helpstring("method Emboss")] HRESULT Emboss(double radius, double sigma, [out, retval] VARIANT_BOOL *pVal);
		[id(22), helpstring("method Gamma")] HRESULT Gamma(double Red, double Green, double Blue, [out, retval] VARIANT_BOOL *pVal);
		[id(23), helpstring("method GaussianBlur")] HRESULT GaussianBlur(double width, double sigma, [out, retval] VARIANT_BOOL *pVal);
		[id(24), helpstring("method Implode")] HRESULT Implode(double factor, [out, retval] VARIANT_BOOL *pVal);
		[id(25), helpstring("method MedianFilter")] HRESULT MedianFilter(double radius, [out, retval] VARIANT_BOOL *pVal);
		[id(26), helpstring("method Minify")] HRESULT Minify([out, retval]VARIANT_BOOL *pVal);
		[id(27), helpstring("method Modulate")] HRESULT Modulate(double brightness, double saturation, double hue, [out, retval] VARIANT_BOOL *pVal);
		[id(28), helpstring("method Negate")] HRESULT Negate(VARIANT_BOOL grayscale, [out, retval] VARIANT_BOOL *pVal);
		[id(29), helpstring("method OilPaint")] HRESULT OilPaint(unsigned int radius, [out, retval] VARIANT_BOOL *pVal);
		[id(30), helpstring("method Opacity")] HRESULT Opacity(unsigned int opacity, [out, retval] VARIANT_BOOL *pVal);
		[id(31), helpstring("method Roll")] HRESULT Roll(int columns, int rows, [out, retval] VARIANT_BOOL *pVal);
		[id(32), helpstring("method Solarize")] HRESULT Solarize(double factor, [out, retval] VARIANT_BOOL *pVal);
		[id(33), helpstring("method Spread")] HRESULT Spread(unsigned int amount, [out, retval] VARIANT_BOOL *pVal);
		[id(34), helpstring("method Sharpen")] HRESULT Sharpen(double radius, double sigma, [out, retval] VARIANT_BOOL *pVal);
		[id(35), helpstring("method Shade")] HRESULT Shade(double azimuth, double elevation, VARIANT_BOOL colorShading, [out, retval] VARIANT_BOOL *pVal);
		[id(36), helpstring("method Shear")] HRESULT Shear(double xShearAngle, double yShearAngle, [out, retval] VARIANT_BOOL *pVal);
		[id(37), helpstring("method Swirl")] HRESULT Swirl(double degrees, [out, retval] VARIANT_BOOL *pVal);
		[id(38), helpstring("method Wave")] HRESULT Wave(double amplitude, double wavelength, [out, retval] VARIANT_BOOL *pVal);
		[id(39), helpstring("method UnsharpMask")] HRESULT UnsharpMask(double radius, double sigma, double amount, double threshold, [out, retval] VARIANT_BOOL *pVal);
		[id(40), helpstring("method Trim")] HRESULT Trim([out, retval] VARIANT_BOOL *pVal);
		[id(41), helpstring("method Blur")] HRESULT Blur(double radius, double sigma, [out, retval] VARIANT_BOOL *pVal);
		[id(42), helpstring("method Charcoal")] HRESULT Charcoal(double radius, double sigma,[out, retval] VARIANT_BOOL *pVal);
		[id(43), helpstring("method Erase")] HRESULT Erase([out, retval] VARIANT_BOOL *pVal);
		[id(44), helpstring("method Magnify")] HRESULT Magnify([out, retval] VARIANT_BOOL *pVal);
		[id(45), helpstring("method Quantize")] HRESULT Quantize(VARIANT_BOOL measureError, [out, retval] VARIANT_BOOL *pVal);
		[id(46), helpstring("method Threshold")] HRESULT Threshold(double threshold, [out, retval] VARIANT_BOOL *pVal);
		[id(47), helpstring("method Crop")] HRESULT Crop(BSTR geometry, [out, retval] VARIANT_BOOL *pVal);
		[propget, id(48), helpstring("property Format")] HRESULT Format([out, retval] BSTR *pVal);
		[propget, id(49), helpstring("property meanErrorPerPixel")] HRESULT meanErrorPerPixel([out, retval] double *pVal);
		[propget, id(50), helpstring("property Quality")] HRESULT Quality([out, retval] unsigned int *pVal);
		[propput, id(50), helpstring("property Quality")] HRESULT Quality([in] unsigned int Quality);
		[propget, id(51), helpstring("property Depth")] HRESULT Depth([out, retval] unsigned int *pVal);
		[propput, id(51), helpstring("property Depth")] HRESULT Depth([in] unsigned int newVal);
		[propget, id(52), helpstring("property FileSize")] HRESULT FileSize([out, retval] long *pVal);
		[propget, id(53), helpstring("property Adjoin")] HRESULT Adjoin([out, retval] VARIANT_BOOL *pVal);
		[propput, id(53), helpstring("property Adjoin")] HRESULT Adjoin([in] VARIANT_BOOL newVal);
		[propget, id(54), helpstring("property AntiAlias")] HRESULT AntiAlias([out, retval] VARIANT_BOOL *pVal);
		[propput, id(54), helpstring("property AntiAlias")] HRESULT AntiAlias([in] VARIANT_BOOL newVal);
		[propget, id(55), helpstring("property AnimationDelay")] HRESULT AnimationDelay([out, retval] unsigned int *pVal);
		[propput, id(55), helpstring("property AnimationDelay")] HRESULT AnimationDelay([in] unsigned int newVal);
		[propget, id(56), helpstring("property AnimationIterations")] HRESULT AnimationIterations([out, retval] unsigned int *pVal);
		[propput, id(56), helpstring("property AnimationIterations")] HRESULT AnimationIterations([in] unsigned int newVal);
		[propget, id(57), helpstring("property BackgroundTexture")] HRESULT BackgroundTexture([out, retval] BSTR *pVal);
		[propput, id(57), helpstring("property BackgroundTexture")] HRESULT BackgroundTexture([in] BSTR newVal);
		[propget, id(58), helpstring("property BaseColumns")] HRESULT BaseColumns([out, retval] unsigned int *pVal);
		[propget, id(59), helpstring("property BaseRows")] HRESULT BaseRows([out, retval] unsigned int *pVal);
		[propget, id(60), helpstring("property ColorFuzz")] HRESULT ColorFuzz([out, retval] double *pVal);
		[propput, id(60), helpstring("property ColorFuzz")] HRESULT ColorFuzz([in] double newVal);
		[propget, id(61), helpstring("property Density")] HRESULT Density([out, retval] BSTR *pVal);
		[propput, id(61), helpstring("property Density")] HRESULT Density([in] BSTR newVal);
		[propget, id(62), helpstring("property GIFDisposeMethod")] HRESULT GIFDisposeMethod([out, retval] unsigned int *pVal);
		[propput, id(62), helpstring("property GIFDisposeMethod")] HRESULT GIFDisposeMethod([in] unsigned int newVal);
		[propget, id(63), helpstring("property Magick")] HRESULT Magick([out, retval] BSTR *pVal);
		[propput, id(63), helpstring("property Magick")] HRESULT Magick([in] BSTR newVal);
		[propget, id(64), helpstring("property Matte")] HRESULT Matte([out, retval] VARIANT_BOOL *pVal);
		[propput, id(64), helpstring("property Matte")] HRESULT Matte([in] VARIANT_BOOL newVal);
		[propget, id(65), helpstring("property Monochrome")] HRESULT Monochrome([out, retval] VARIANT_BOOL *pVal);
		[propput, id(65), helpstring("property Monochrome")] HRESULT Monochrome([in] VARIANT_BOOL newVal);
		[propget, id(66), helpstring("property NormalizedMaxError")] HRESULT NormalizedMaxError([out, retval] double *pVal);
		[propget, id(67), helpstring("property NormalizedMeanError")] HRESULT NormalizedMeanError([out, retval] double *pVal);
		[propget, id(68), helpstring("property QuantizedColors")] HRESULT QuantizedColors([out, retval] unsigned int *pVal);
		[propput, id(68), helpstring("property QuantizedColors")] HRESULT QuantizedColors([in] unsigned int newVal);
		[propget, id(69), helpstring("property QuantizeDither")] HRESULT QuantizeDither([out, retval] VARIANT_BOOL *pVal);
		[propput, id(69), helpstring("property QuantizeDither")] HRESULT QuantizeDither([in] VARIANT_BOOL newVal);
		[propget, id(70), helpstring("property QuantizeTreeDepth")] HRESULT QuantizeTreeDepth([out, retval] unsigned int *pVal);
		[propput, id(70), helpstring("property QuantizeTreeDepth")] HRESULT QuantizeTreeDepth([in] unsigned int newVal);
		[propget, id(71), helpstring("property Scene")] HRESULT Scene([out, retval] unsigned int *pVal);
		[propput, id(71), helpstring("property Scene")] HRESULT Scene([in] unsigned int newVal);
		[propget, id(72), helpstring("property StrokeAntiAlias")] HRESULT StrokeAntiAlias([out, retval] VARIANT_BOOL *pVal);
		[propput, id(72), helpstring("property StrokeAntiAlias")] HRESULT StrokeAntiAlias([in] VARIANT_BOOL newVal);
		[propget, id(73), helpstring("property StrokeDashOffset")] HRESULT StrokeDashOffset([out, retval] unsigned int *pVal);
		[propput, id(73), helpstring("property StrokeDashOffset")] HRESULT StrokeDashOffset([in] unsigned int newVal);
		[propget, id(74), helpstring("property StrokeMiterLimit")] HRESULT StrokeMiterLimit([out, retval] unsigned int *pVal);
		[propput, id(74), helpstring("property StrokeMiterLimit")] HRESULT StrokeMiterLimit([in] unsigned int newVal);
		[propget, id(75), helpstring("property StrokeWidth")] HRESULT StrokeWidth([out, retval] double *pVal);
		[propput, id(75), helpstring("property StrokeWidth")] HRESULT StrokeWidth([in] double newVal);
		[propget, id(76), helpstring("property SubImage")] HRESULT SubImage([out, retval] unsigned int *pVal);
		[propput, id(76), helpstring("property SubImage")] HRESULT SubImage([in] unsigned int newVal);
		[propget, id(77), helpstring("property SubRange")] HRESULT SubRange([out, retval] unsigned int *pVal);
		[propput, id(77), helpstring("property SubRange")] HRESULT SubRange([in] unsigned int newVal);
		[propget, id(78), helpstring("property TotalColors")] HRESULT TotalColors([out, retval] unsigned long *pVal);
		[propget, id(79), helpstring("property XResolution")] HRESULT XResolution([out, retval] double *pVal);
		[propget, id(80), helpstring("property YResolution")] HRESULT YResolution([out, retval] double *pVal);
		[propget, id(81), helpstring("property Signature")] HRESULT Signature(VARIANT_BOOL Force, [out, retval] BSTR *pVal);
		[propget, id(82), helpstring("property Label")] HRESULT Label([out, retval] BSTR *pVal);
		[propput, id(82), helpstring("property Label")] HRESULT Label([in] BSTR newVal);
		[id(83), helpstring("method Border")] HRESULT Border(BSTR cGeometry,[out, retval] VARIANT_BOOL *pVal);
		[id(84), helpstring("method AddNoise")] HRESULT AddNoise(int nNoiseType,[out, retval] VARIANT_BOOL *pVal);
		[id(85), helpstring("method Channel")] HRESULT Channel(int nChannelType,[out, retval] VARIANT_BOOL *pVal);
		[id(86), helpstring("method Chop")] HRESULT Chop(BSTR cGeometry,[out, retval] VARIANT_BOOL *pVal);
		[id(87), helpstring("method CycleColormap")] HRESULT CycleColormap(int nAmount, [out, retval] VARIANT_BOOL *pVal);
		[id(88), helpstring("method Frame")] HRESULT Frame(unsigned int width, unsigned int height, int InnerBevel, int OuterBevel, [out, retval] VARIANT_BOOL *pVal);
		[id(89), helpstring("method Ping")] HRESULT Ping(BSTR cFilename, [out, retval] VARIANT_BOOL *pVal);
		[id(90), helpstring("method Raise")] HRESULT Raise(BSTR cGeometry, VARIANT_BOOL RaisedFlag, [out, retval] VARIANT_BOOL *pVal);
		[id(91), helpstring("method ReduceNoise")] HRESULT ReduceNoise(int Order, [out, retval] VARIANT_BOOL *pVal);
		[id(92), helpstring("method Segment")] HRESULT Segment(double ClusterThreshold, double SmoothingThreshold, [out, retval] VARIANT_BOOL *pVal);
		[id(93), helpstring("method Shave")] HRESULT Shave(BSTR cGeometry, [out, retval] VARIANT_BOOL *pVal);
		[id(94), helpstring("method ShowMessage")] HRESULT ShowMessage(long uiMsg);
		[propget, id(95), helpstring("property Images")] HRESULT Images([out, retval] IImageCollection* *pVal);
		[id(96), helpstring("method GetImageAddress")] HRESULT GetImageAddress([out, retval] long *pVal);
		[id(97), helpstring("method Composite")] HRESULT Composite(IImage *pImage, BSTR cGeometry, int CompositeOp, [out, retval] VARIANT_BOOL *pVal);
		[id(98), helpstring("method Stegano")] HRESULT Stegano([in] IImage *pImage, [out, retval] VARIANT_BOOL *pVal);
	};


	[
		object,
		uuid(5B5A7365-75BA-4F88-ABBF-64695DAAA2B0),
		dual,
		helpstring("IImageControl Interface"),
		pointer_default(unique)
	]
	interface IImageControl : IDispatch
	{
		[propget, id(1), helpstring("property Image")] HRESULT Image([out, retval] IImage* *pVal);
		[propget, id(2), helpstring("property GetAddress")] HRESULT GetAddress([out, retval] long *pVal);
		[id(3), helpstring("method SampleMessage")] HRESULT SampleMessage();
	};
	[
		object,
		uuid(2DB6FBA7-2E7E-4F2D-AC2E-29AFB42E419F),
		dual,
		helpstring("IGeometry Interface"),
		pointer_default(unique)
	]
	interface IGeometry : IDispatch
	{
		[propget, id(1), helpstring("property Width")] HRESULT Width([out, retval] unsigned int *pVal);
		[propput, id(1), helpstring("property Width")] HRESULT Width([in] unsigned int newVal);
		[propget, id(2), helpstring("property Height")] HRESULT Height([out, retval] unsigned int *pVal);
		[propput, id(2), helpstring("property Height")] HRESULT Height([in] unsigned int newVal);
		[propget, id(3), helpstring("property XOff")] HRESULT XOff([out, retval] unsigned int *pVal);
		[propput, id(3), helpstring("property XOff")] HRESULT XOff([in] unsigned int newVal);
		[propget, id(4), helpstring("property YOff")] HRESULT YOff([out, retval] unsigned int *pVal);
		[propput, id(4), helpstring("property YOff")] HRESULT YOff([in] unsigned int newVal);
		[propget, id(5), helpstring("property XNegative")] HRESULT XNegative([out, retval] VARIANT_BOOL *pVal);
		[propput, id(5), helpstring("property XNegative")] HRESULT XNegative([in] VARIANT_BOOL newVal);
		[propget, id(6), helpstring("property YNegative")] HRESULT YNegative([out, retval] VARIANT_BOOL *pVal);
		[propput, id(6), helpstring("property YNegative")] HRESULT YNegative([in] VARIANT_BOOL newVal);
		[propget, id(7), helpstring("property Percent")] HRESULT Percent([out, retval] VARIANT_BOOL *pVal);
		[propput, id(7), helpstring("property Percent")] HRESULT Percent([in] VARIANT_BOOL newVal);
		[propget, id(8), helpstring("property Aspect")] HRESULT Aspect([out, retval] VARIANT_BOOL *pVal);
		[propput, id(8), helpstring("property Aspect")] HRESULT Aspect([in] VARIANT_BOOL newVal);
		[propget, id(9), helpstring("property Greater")] HRESULT Greater([out, retval] VARIANT_BOOL *pVal);
		[propput, id(9), helpstring("property Greater")] HRESULT Greater([in] VARIANT_BOOL newVal);
		[propget, id(10), helpstring("property Less")] HRESULT Less([out, retval] VARIANT_BOOL *pVal);
		[propput, id(10), helpstring("property Less")] HRESULT Less([in] VARIANT_BOOL newVal);
		[id(11), helpstring("method IsValid")] HRESULT IsValid([out, retval] VARIANT_BOOL *pVal);
		[id(12), helpstring("method Geometry")] HRESULT Geometry([in] BSTR PSSizeNick, [out, retval] BSTR *pVal);
	};
	[
		object,
		uuid(983302C5-A008-494A-A16A-D596EC1B38D1),
		dual,
		helpstring("IColor Interface"),
		pointer_default(unique)
	]
	interface IColor : IDispatch
	{
		[propget, id(1), helpstring("property ColorMode")] HRESULT ColorMode([out, retval] BSTR *pVal);
		[id(2), helpstring("method SetRGB")] HRESULT SetRGB(double Red, double Green, double Blue);
		[id(3), helpstring("method SetGray")] HRESULT SetGray(double Shade);
		[id(4), helpstring("method SetMono")] HRESULT SetMono(VARIANT_BOOL WhitePixel);
		[id(5), helpstring("method SetHSL")] HRESULT SetHSL(double Hue, double Saturation, double Luminosity);
		[id(6), helpstring("method SetYUV")] HRESULT SetYUV(double Y, double U, double V);
	};
	interface IImage; // Fwd declaration
	[
		object,
		uuid(FB9C5C71-A094-4CCA-9CBE-470524DE3800),
		dual,
		helpstring("IImageCollection Interface"),
		pointer_default(unique)
	]
	interface IImageCollection : IDispatch
	{
		[id(1), helpstring("method Add")] HRESULT Add([in] IImage* pVal);
		[id(2), helpstring("method Remove")] HRESULT Remove([in] long n, [out,retval] IImage** ppVal);
		[propget] HRESULT Count([out, retval] long* pnCount);
		[id(DISPID_VALUE), propget, helpstring("property Item (1-based)")] HRESULT Item([in] long n, [out, retval] IImage** ppItem);
		[id(DISPID_NEWENUM), propget, restricted] HRESULT _NewEnum([out, retval] IUnknown** ppEnum);
	};

[
	uuid(268B14B7-3123-4ACC-ACF4-55D2B9E69065),
	version(1.0),
	helpstring("MagickCOM 1.0 Type Library")
]
library MAGICKCOMLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(1FA85FFC-C245-4C1E-B121-00CA5EAB94F4),
		helpstring("Image Class")
	]
	coclass Image
	{
		[default] interface IImage;		
	};
	[
		uuid(6CC4DF86-9661-4B00-A6A9-32C7787A8D07),
		helpstring("ImageControl Class")
	]
	coclass ImageControl
	{
		[default] interface IImageControl;
		//interface IImageCollection;
	};
	[
		uuid(F21700BE-8E79-40F4-B8C5-3038A9AA8430),
		helpstring("Geometry Class")
	]
	coclass Geometry
	{
		[default] interface IGeometry;
	};
	[
		uuid(F4D71BC1-2606-4EB6-9E67-814D12D97CD7),
		helpstring("Color Class")
	]
	coclass Color
	{
		[default] interface IColor;
	};
	[
		uuid(C110309D-B468-47DF-AA2F-415825F87FC8),
		helpstring("ImageCollection Class"),
		noncreatable,
	]
	coclass ImageCollection
	{
		[default] interface IImageCollection;
	};
};
