// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'iewic.pas' rev: 30.00 (Windows)

#ifndef IewicHPP
#define IewicHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <Winapi.Messages.hpp>
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>
#include <Winapi.ActiveX.hpp>
#include <Vcl.Graphics.hpp>
#include <Vcl.Controls.hpp>
#include <imageenio.hpp>
#include <hyiedefs.hpp>
#include <hyieutils.hpp>
#include <ieds.hpp>
#include <iewia.hpp>
#include <Vcl.Dialogs.hpp>

//-- user supplied -----------------------------------------------------------

namespace Iewic
{
//-- forward type declarations -----------------------------------------------
__interface IE_IWICBitmapCodecProgressNotification;
typedef System::DelphiInterface<IE_IWICBitmapCodecProgressNotification> _di_IE_IWICBitmapCodecProgressNotification;
__interface IE_IWICStream;
typedef System::DelphiInterface<IE_IWICStream> _di_IE_IWICStream;
struct IE_WICRect;
__interface IE_IWICPalette;
typedef System::DelphiInterface<IE_IWICPalette> _di_IE_IWICPalette;
__interface IE_IWICBitmapSource;
typedef System::DelphiInterface<IE_IWICBitmapSource> _di_IE_IWICBitmapSource;
__interface IE_IWICFormatConverter;
typedef System::DelphiInterface<IE_IWICFormatConverter> _di_IE_IWICFormatConverter;
__interface IE_IWICMetadataQueryReader;
typedef System::DelphiInterface<IE_IWICMetadataQueryReader> _di_IE_IWICMetadataQueryReader;
__interface IE_IWICMetadataQueryWriter;
typedef System::DelphiInterface<IE_IWICMetadataQueryWriter> _di_IE_IWICMetadataQueryWriter;
__interface IE_IWICBitmapFrameDecode;
typedef System::DelphiInterface<IE_IWICBitmapFrameDecode> _di_IE_IWICBitmapFrameDecode;
__interface IE_IWICBitmapDecoder;
typedef System::DelphiInterface<IE_IWICBitmapDecoder> _di_IE_IWICBitmapDecoder;
struct IE_PROPBAG2;
__interface IE_IPropertyBag2;
typedef System::DelphiInterface<IE_IPropertyBag2> _di_IE_IPropertyBag2;
__interface IE_IWICBitmapFrameEncode;
typedef System::DelphiInterface<IE_IWICBitmapFrameEncode> _di_IE_IWICBitmapFrameEncode;
__interface IE_IWICBitmapEncoder;
typedef System::DelphiInterface<IE_IWICBitmapEncoder> _di_IE_IWICBitmapEncoder;
__interface IE_IWICBitmapLock;
typedef System::DelphiInterface<IE_IWICBitmapLock> _di_IE_IWICBitmapLock;
__interface IE_IWICBitmap;
typedef System::DelphiInterface<IE_IWICBitmap> _di_IE_IWICBitmap;
__interface IE_IWICBitmapScaler;
typedef System::DelphiInterface<IE_IWICBitmapScaler> _di_IE_IWICBitmapScaler;
__interface IE_IWICImagingFactory;
typedef System::DelphiInterface<IE_IWICImagingFactory> _di_IE_IWICImagingFactory;
class DELPHICLASS TIEWICReader;
class DELPHICLASS TIEWICWriter;
class DELPHICLASS TIEWICBitmapWrapper;
class DELPHICLASS TIEWICBaseFunctionality;
class DELPHICLASS TIEWICFormatConverter;
class DELPHICLASS TIEWICBitmapScaler;
//-- type declarations -------------------------------------------------------
typedef HRESULT __stdcall (*IE_ProgressNotificationCallback)(void * pvData, unsigned uFrameNum, unsigned operation, double dblProgress);

__interface  INTERFACE_UUID("{64C1024E-C3CF-4462-8078-88C2B11C46D9}") IE_IWICBitmapCodecProgressNotification  : public System::IInterface 
{
	virtual HRESULT __stdcall RegisterProgressNotification(IE_ProgressNotificationCallback pfnProgressNotification, void * pvData, unsigned dwProgressFlags) = 0 ;
};

__interface  INTERFACE_UUID("{135FF860-22B7-4DDF-B0F6-218F4F299A43}") IE_IWICStream  : public IStream 
{
	virtual HRESULT __stdcall InitializeFromIStream(Hyiedefs::_di_IIEStream pIStream) = 0 ;
	virtual HRESULT __stdcall InitializeFromFilename(System::WideChar * wzFileName, unsigned dwDesiredAccess) = 0 ;
	virtual HRESULT __stdcall InitializeFromMemory(System::PByte pbBuffer, unsigned cbBufferSize) = 0 ;
	virtual HRESULT __stdcall InitializeFromIStreamRegion(void) = 0 ;
};

struct DECLSPEC_DRECORD IE_WICRect
{
public:
	int X;
	int Y;
	int Width;
	int Height;
};


typedef IE_WICRect *IE_PWICRect;

typedef unsigned IE_WICBitmapPaletteType;

typedef unsigned IE_WICColor;

typedef unsigned *IE_PWICColor;

__interface  INTERFACE_UUID("{00000040-A8F2-4877-BA0A-FD2B6645FB94}") IE_IWICPalette  : public System::IInterface 
{
	virtual HRESULT __stdcall InitializePredefined(unsigned ePaletteType, System::LongBool fAddTransparentColor) = 0 ;
	virtual HRESULT __stdcall InitializeCustom(IE_PWICColor pColors, unsigned cCount) = 0 ;
	virtual HRESULT __stdcall InitializeFromBitmap(_di_IE_IWICBitmapSource pISurface, unsigned cCount, System::LongBool fAddTransparentColor) = 0 ;
	virtual HRESULT __stdcall InitializeFromPalette(_di_IE_IWICPalette pIPalette) = 0 ;
	virtual HRESULT __stdcall GetType(/* out */ unsigned &pePaletteType) = 0 ;
	virtual HRESULT __stdcall GetColorCount(/* out */ unsigned &pcCount) = 0 ;
	virtual HRESULT __stdcall GetColors(unsigned cCount, IE_PWICColor pColors, /* out */ unsigned &pcActualColors) = 0 ;
	virtual HRESULT __stdcall IsBlackWhite(/* out */ System::LongBool &pfIsBlackWhite) = 0 ;
	virtual HRESULT __stdcall IsGrayscale(/* out */ System::LongBool &pfIsGrayscale) = 0 ;
	virtual HRESULT __stdcall HasAlpha(/* out */ System::LongBool &pfHasAlpha) = 0 ;
};

__interface  INTERFACE_UUID("{00000120-A8F2-4877-BA0A-FD2B6645FB94}") IE_IWICBitmapSource  : public System::IInterface 
{
	virtual HRESULT __stdcall GetSize(/* out */ unsigned &puiWidth, /* out */ unsigned &puiHeight) = 0 ;
	virtual HRESULT __stdcall GetPixelFormat(/* out */ GUID &pPixelFormat) = 0 ;
	virtual HRESULT __stdcall GetResolution(/* out */ double &pDpiX, /* out */ double &pDpiY) = 0 ;
	virtual HRESULT __stdcall CopyPalette(_di_IE_IWICPalette pIPalette) = 0 ;
	virtual HRESULT __stdcall CopyPixels(IE_PWICRect prc, unsigned cbStride, unsigned cbBufferSize, System::PByte pbBuffer) = 0 ;
};

__interface  INTERFACE_UUID("{00000301-A8F2-4877-BA0A-FD2B6645FB94}") IE_IWICFormatConverter  : public IE_IWICBitmapSource 
{
	virtual HRESULT __stdcall Initialize(_di_IE_IWICBitmapSource pISource, const GUID &dstFormat, unsigned dither, _di_IE_IWICPalette pIPalette, double alphaThresholdPercent, unsigned paletteTranslate) = 0 ;
	virtual HRESULT __stdcall CanConvert(const GUID &srcPixelFormat, const GUID &dstPixelFormat, /* out */ System::LongBool &pfCanConvert) = 0 ;
};

__interface  INTERFACE_UUID("{30989668-E1C9-4597-B395-458EEDB808DF}") IE_IWICMetadataQueryReader  : public System::IInterface 
{
	virtual HRESULT __stdcall GetContainerFormat(void) = 0 ;
	virtual HRESULT __stdcall GetLocation(void) = 0 ;
	virtual HRESULT __stdcall GetMetadataByName(System::WideChar * wzName, tagPROPVARIANT &pvarValue) = 0 ;
	virtual HRESULT __stdcall GetEnumerator(void) = 0 ;
};

__interface  INTERFACE_UUID("{A721791A-0DEF-4D06-BD91-2118BF1DB10B}") IE_IWICMetadataQueryWriter  : public IE_IWICMetadataQueryReader 
{
	virtual HRESULT __stdcall SetMetadataByName(System::WideChar * wzName, const tagPROPVARIANT &pvarValue) = 0 ;
	virtual HRESULT __stdcall RemoveMetadataByName(System::WideChar * wzName) = 0 ;
};

__interface  INTERFACE_UUID("{3B16811B-6A43-4EC9-A813-3D930C13B940}") IE_IWICBitmapFrameDecode  : public IE_IWICBitmapSource 
{
	virtual HRESULT __stdcall GetMetadataQueryReader(/* out */ _di_IE_IWICMetadataQueryReader &ppIMetadataQueryReader) = 0 ;
	virtual HRESULT __stdcall GetColorContexts(void) = 0 ;
	virtual HRESULT __stdcall GetThumbnail(/* out */ _di_IE_IWICBitmapSource &ppIThumbnail) = 0 ;
};

__interface  INTERFACE_UUID("{9EDDE9E7-8DEE-47EA-99DF-E6FAF2ED44BF}") IE_IWICBitmapDecoder  : public System::IInterface 
{
	virtual HRESULT __stdcall QueryCapability(void) = 0 ;
	virtual HRESULT __stdcall Initialize(void) = 0 ;
	virtual HRESULT __stdcall GetContainerFormat(void) = 0 ;
	virtual HRESULT __stdcall GetDecoderInfo(void) = 0 ;
	virtual HRESULT __stdcall CopyPalette(void) = 0 ;
	virtual HRESULT __stdcall GetMetadataQueryReader(void) = 0 ;
	virtual HRESULT __stdcall GetPreview(void) = 0 ;
	virtual HRESULT __stdcall GetColorContexts(void) = 0 ;
	virtual HRESULT __stdcall GetThumbnail(void) = 0 ;
	virtual HRESULT __stdcall GetFrameCount(/* out */ int &pCount) = 0 ;
	virtual HRESULT __stdcall GetFrame(unsigned index, /* out */ _di_IE_IWICBitmapFrameDecode &ppIBitmapFrame) = 0 ;
};

struct DECLSPEC_DRECORD IE_PROPBAG2
{
public:
	unsigned dwType;
	System::Word vt;
	System::Word cfType;
	unsigned dwHint;
	System::WideChar *pstrName;
	GUID clsid;
};


typedef IE_PROPBAG2 *IE_PPROPBAG2;

typedef tagPROPVARIANT *IE_PPROPVARIANT;

__interface  INTERFACE_UUID("{22F55882-280B-11D0-A8A9-00A0C90C2004}") IE_IPropertyBag2  : public System::IInterface 
{
	virtual HRESULT __stdcall Read(void) = 0 ;
	virtual HRESULT __stdcall Write(unsigned cProperties, IE_PPROPBAG2 pPropBag, IE_PPROPVARIANT pvarValue) = 0 ;
	virtual HRESULT __stdcall CountProperties(void) = 0 ;
	virtual HRESULT __stdcall GetPropertyInfo(void) = 0 ;
	virtual HRESULT __stdcall LoadObject(void) = 0 ;
};

__interface  INTERFACE_UUID("{00000105-A8F2-4877-BA0A-FD2B6645FB94}") IE_IWICBitmapFrameEncode  : public System::IInterface 
{
	virtual HRESULT __stdcall Initialize(_di_IE_IPropertyBag2 pIEncoderOptions) = 0 ;
	virtual HRESULT __stdcall SetSize(unsigned uiWidth, unsigned uiHeight) = 0 ;
	virtual HRESULT __stdcall SetResolution(double dpiX, double dpiY) = 0 ;
	virtual HRESULT __stdcall SetPixelFormat(const GUID &pPixelFormat) = 0 ;
	virtual HRESULT __stdcall SetColorContexts(void) = 0 ;
	virtual HRESULT __stdcall SetPalette(void) = 0 ;
	virtual HRESULT __stdcall SetThumbnail(void) = 0 ;
	virtual HRESULT __stdcall WritePixels(unsigned lineCount, unsigned cbStride, unsigned cbBufferSize, System::PByte pbPixels) = 0 ;
	virtual HRESULT __stdcall WriteSource(void) = 0 ;
	virtual HRESULT __stdcall Commit(void) = 0 ;
	virtual HRESULT __stdcall GetMetadataQueryWriter(/* out */ _di_IE_IWICMetadataQueryWriter &ppIMetadataQueryWriter) = 0 ;
};

__interface  INTERFACE_UUID("{00000103-A8F2-4877-BA0A-FD2B6645FB94}") IE_IWICBitmapEncoder  : public System::IInterface 
{
	virtual HRESULT __stdcall Initialize(_di_IStream pIStream, unsigned cacheOption) = 0 ;
	virtual HRESULT __stdcall GetContainerFormat(void) = 0 ;
	virtual HRESULT __stdcall GetEncoderInfo(void) = 0 ;
	virtual HRESULT __stdcall SetColorContexts(void) = 0 ;
	virtual HRESULT __stdcall SetPalette(void) = 0 ;
	virtual HRESULT __stdcall SetThumbnail(void) = 0 ;
	virtual HRESULT __stdcall SetPreview(void) = 0 ;
	virtual HRESULT __stdcall CreateNewFrame(/* out */ _di_IE_IWICBitmapFrameEncode &ppIFrameEncode, _di_IE_IPropertyBag2 ppIEncoderOptions) = 0 ;
	virtual HRESULT __stdcall Commit(void) = 0 ;
	virtual HRESULT __stdcall GetMetadataQueryWriter(void) = 0 ;
};

typedef System::PByte IE_WICInProcPointer;

__interface  INTERFACE_UUID("{00000123-A8F2-4877-BA0A-FD2B6645FB94}") IE_IWICBitmapLock  : public System::IInterface 
{
	virtual HRESULT __stdcall GetSize(/* out */ unsigned &puiWidth, /* out */ unsigned &puiHeight) = 0 ;
	virtual HRESULT __stdcall GetStride(/* out */ unsigned &pcbStride) = 0 ;
	virtual HRESULT __stdcall GetDataPointer(/* out */ unsigned &pcbBufferSize, /* out */ System::PByte &ppbData) = 0 ;
	virtual HRESULT __stdcall GetPixelFormat(/* out */ GUID &pPixelFormat) = 0 ;
};

__interface  INTERFACE_UUID("{00000121-A8F2-4877-BA0A-FD2B6645FB94}") IE_IWICBitmap  : public IE_IWICBitmapSource 
{
	virtual HRESULT __stdcall Lock(IE_PWICRect prcLock, unsigned flags, /* out */ _di_IE_IWICBitmapLock &ppILock) = 0 ;
	virtual HRESULT __stdcall SetPalette(_di_IE_IWICPalette pIPalette) = 0 ;
	virtual HRESULT __stdcall SetResolution(double dpiX, double dpiY) = 0 ;
};

typedef unsigned IE_WICBitmapCreateCacheOption;

typedef unsigned IE_WICBitmapInterpolationMode;

__interface  INTERFACE_UUID("{00000302-A8F2-4877-BA0A-FD2B6645FB94}") IE_IWICBitmapScaler  : public IE_IWICBitmapSource 
{
	virtual HRESULT __stdcall Initialize(_di_IE_IWICBitmapSource pISource, unsigned uiWidth, unsigned uiHeight, unsigned mode) = 0 ;
};

__interface  INTERFACE_UUID("{EC5EC8A9-C395-4314-9C77-54D7A935FF70}") IE_IWICImagingFactory  : public System::IInterface 
{
	virtual HRESULT __stdcall CreateDecoderFromFilename(void) = 0 ;
	virtual HRESULT __stdcall CreateDecoderFromStream(_di_IStream pIStream, const GUID &pguidVendor, unsigned metadataOptions, /* out */ _di_IE_IWICBitmapDecoder &ppIDecoder) = 0 ;
	virtual HRESULT __stdcall CreateDecoderFromFileHandle(void) = 0 ;
	virtual HRESULT __stdcall CreateComponentInfo(void) = 0 ;
	virtual HRESULT __stdcall CreateDecoder(const GUID &guidContainerFormat, const GUID &pguidVendor, /* out */ _di_IE_IWICBitmapDecoder &ppIDecoder) = 0 ;
	virtual HRESULT __stdcall CreateEncoder(const GUID &guidContainerFormat, const GUID &pguidVendor, /* out */ _di_IE_IWICBitmapEncoder &ppIEncoder) = 0 ;
	virtual HRESULT __stdcall CreatePalette(/* out */ _di_IE_IWICPalette &ppIPalette) = 0 ;
	virtual HRESULT __stdcall CreateFormatConverter(/* out */ _di_IE_IWICFormatConverter &ppIFormatConverter) = 0 ;
	virtual HRESULT __stdcall CreateBitmapScaler(/* out */ _di_IE_IWICBitmapScaler &ppIBitmapScaler) = 0 ;
	virtual HRESULT __stdcall CreateBitmapClipper(void) = 0 ;
	virtual HRESULT __stdcall CreateBitmapFlipRotator(void) = 0 ;
	virtual HRESULT __stdcall CreateStream(/* out */ _di_IE_IWICStream &ppIWICStream) = 0 ;
	virtual HRESULT __stdcall CreateColorContext(void) = 0 ;
	virtual HRESULT __stdcall CreateColorTransformer(void) = 0 ;
	virtual HRESULT __stdcall CreateBitmap(void) = 0 ;
	virtual HRESULT __stdcall CreateBitmapFromSource(_di_IE_IWICBitmapSource pIBitmapSource, unsigned option, /* out */ _di_IE_IWICBitmap &ppIBitmap) = 0 ;
	virtual HRESULT __stdcall CreateBitmapFromSourceRect(void) = 0 ;
	virtual HRESULT __stdcall CreateBitmapFromMemory(void) = 0 ;
	virtual HRESULT __stdcall CreateBitmapFromHBITMAP(void) = 0 ;
	virtual HRESULT __stdcall CreateBitmapFromHICON(void) = 0 ;
	virtual HRESULT __stdcall CreateComponentEnumerator(void) = 0 ;
	virtual HRESULT __stdcall CreateFastMetadataEncoderFromDecoder(void) = 0 ;
	virtual HRESULT __stdcall CreateFastMetadataEncoderFromFrameDecode(void) = 0 ;
	virtual HRESULT __stdcall CreateQueryWriter(void) = 0 ;
	virtual HRESULT __stdcall CreateQueryWriterFromReader(void) = 0 ;
};

enum DECLSPEC_DENUM TIEWICTIFFCompressionMethod : unsigned char { ieWICTiffCompressionDontCare, ieWICTiffCompressionNone, ieWICTiffCompressionCCITT3, ieWICTiffCompressionCCITT4, ieWICTiffCompressionLZW, ieWICTiffCompressionRLE, ieWICTiffCompressionZIP };

class PASCALIMPLEMENTATION TIEWICReader : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	bool fOLEInitialized;
	_di_IE_IWICImagingFactory fWICImagingFactory;
	_di_IE_IWICBitmapDecoder fDecoder;
	_di_IE_IWICBitmapFrameDecode fFrame;
	_di_IE_IWICMetadataQueryReader fQueryReader;
	double fDPIX;
	double fDPIY;
	System::Classes::TStream* fStream;
	__int64 fStreamBase;
	Hyieutils::TIEWideFileStream* fFileStream;
	int __fastcall GetFrameCount(void);
	
public:
	__fastcall TIEWICReader(void);
	__fastcall virtual ~TIEWICReader(void);
	bool __fastcall IsAvailable(void);
	bool __fastcall Open(System::Classes::TStream* Stream, int fileType)/* overload */;
	bool __fastcall Open(const System::WideString FileName, int fileType)/* overload */;
	void __fastcall Close(void);
	void __fastcall GetFrame(int frameIndex, Hyieutils::TIEBitmap* destBitmap, Imageenio::TIOParamsVals* IOParams = (Imageenio::TIOParamsVals*)(0x0), Hyiedefs::pboolean Aborting = (Hyiedefs::pboolean)(0x0));
	__property int FrameCount = {read=GetFrameCount, nodefault};
	unsigned __fastcall FrameWidth(void);
	unsigned __fastcall FrameHeight(void);
	__property double DPIX = {read=fDPIX, write=fDPIX};
	__property double DPIY = {read=fDPIY, write=fDPIY};
	tagPROPVARIANT __fastcall QueryMetadata(const System::UnicodeString query);
};


class PASCALIMPLEMENTATION TIEWICWriter : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	bool fOLEInitialized;
	_di_IE_IWICImagingFactory fWICImagingFactory;
	_di_IE_IWICBitmapEncoder fEncoder;
	double fDPIX;
	double fDPIY;
	double fImageQuality;
	double fCompressionQuality;
	bool fLossless;
	bool fUseCodecOptions;
	int fQuality;
	int fOverlap;
	int fSubsampling;
	int fHorizontalTileSlices;
	int fVerticalTileSlices;
	bool fFrequencyOrder;
	TIEWICTIFFCompressionMethod fTIFFCompressionMethod;
	System::Classes::TStream* fStream;
	__int64 fStreamBase;
	Hyieutils::TIEWideFileStream* fFileStream;
	
public:
	__fastcall TIEWICWriter(void);
	__fastcall virtual ~TIEWICWriter(void);
	bool __fastcall IsAvailable(void);
	bool __fastcall Open(const System::WideString FileName, int fileType)/* overload */;
	bool __fastcall Open(System::Classes::TStream* Stream, int fileType)/* overload */;
	void __fastcall Close(void);
	void __fastcall PutFrame(Hyieutils::TIEBitmap* srcBitmap, Imageenio::TIOParamsVals* IOParams = (Imageenio::TIOParamsVals*)(0x0));
	__property double DPIX = {read=fDPIX, write=fDPIX};
	__property double DPIY = {read=fDPIY, write=fDPIY};
	__property double ImageQuality = {read=fImageQuality, write=fImageQuality};
	__property double CompressionQuality = {read=fCompressionQuality, write=fCompressionQuality};
	__property bool Lossless = {read=fLossless, write=fLossless, nodefault};
	__property bool UseCodecOptions = {read=fUseCodecOptions, write=fUseCodecOptions, nodefault};
	__property int Quality = {read=fQuality, write=fQuality, nodefault};
	__property int Overlap = {read=fOverlap, write=fOverlap, nodefault};
	__property int Subsampling = {read=fSubsampling, write=fSubsampling, nodefault};
	__property int HorizontalTileSlices = {read=fHorizontalTileSlices, write=fHorizontalTileSlices, nodefault};
	__property int VerticalTileSlices = {read=fVerticalTileSlices, write=fVerticalTileSlices, nodefault};
	__property bool FrequencyOrder = {read=fFrequencyOrder, write=fFrequencyOrder, nodefault};
	__property TIEWICTIFFCompressionMethod TIFFCompressionMethod = {read=fTIFFCompressionMethod, write=fTIFFCompressionMethod, nodefault};
};


#pragma pack(push,4)
class PASCALIMPLEMENTATION TIEWICBitmapWrapper : public System::TInterfacedObject
{
	typedef System::TInterfacedObject inherited;
	
private:
	Hyieutils::TIEBaseBitmap* m_bitmap;
	Hyieutils::TIEBaseBitmap* m_alpha;
	
public:
	__fastcall TIEWICBitmapWrapper(Hyieutils::TIEBaseBitmap* Bitmap, Hyieutils::TIEBaseBitmap* Alpha);
	__fastcall virtual ~TIEWICBitmapWrapper(void);
	HRESULT __stdcall GetSize(/* out */ unsigned &puiWidth, /* out */ unsigned &puiHeight);
	HRESULT __stdcall GetPixelFormat(/* out */ GUID &pPixelFormat);
	HRESULT __stdcall GetResolution(/* out */ double &pDpiX, /* out */ double &pDpiY);
	HRESULT __stdcall CopyPalette(_di_IE_IWICPalette pIPalette);
	HRESULT __stdcall CopyPixels(IE_PWICRect prc, unsigned cbStride, unsigned cbBufferSize, System::PByte pbBuffer);
private:
	void *__IE_IWICBitmapSource;	// IE_IWICBitmapSource 
	
public:
	#if defined(MANAGED_INTERFACE_OPERATORS)
	// {00000120-A8F2-4877-BA0A-FD2B6645FB94}
	operator _di_IE_IWICBitmapSource()
	{
		_di_IE_IWICBitmapSource intf;
		this->GetInterface(intf);
		return intf;
	}
	#else
	operator IE_IWICBitmapSource*(void) { return (IE_IWICBitmapSource*)&__IE_IWICBitmapSource; }
	#endif
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TIEWICBaseFunctionality : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	bool m_OLEInitialized;
	_di_IE_IWICImagingFactory m_WICImagingFactory;
	
public:
	__fastcall TIEWICBaseFunctionality(void);
	__fastcall virtual ~TIEWICBaseFunctionality(void);
	bool __fastcall IsAvailable(void);
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TIEWICFormatConverter : public TIEWICBaseFunctionality
{
	typedef TIEWICBaseFunctionality inherited;
	
private:
	unsigned m_paletteType;
	unsigned m_ditherType;
	
public:
	__fastcall TIEWICFormatConverter(void);
	bool __fastcall Convert(Hyieutils::TIEBitmap* Source, Hyieutils::TIEBitmap* Dest, Hyieutils::TIEPixelFormat DestPixelFormat, bool CheckParametersOnly, Hyiedefs::TIEProgressEvent OnProgressFunction = 0x0, System::TObject* OnProgressSender = (System::TObject*)(0x0));
	__property unsigned PaletteType = {read=m_paletteType, write=m_paletteType, nodefault};
	__property unsigned DitherType = {read=m_ditherType, write=m_ditherType, nodefault};
public:
	/* TIEWICBaseFunctionality.Destroy */ inline __fastcall virtual ~TIEWICFormatConverter(void) { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TIEWICBitmapScaler : public TIEWICBaseFunctionality
{
	typedef TIEWICBaseFunctionality inherited;
	
public:
	bool __fastcall Resample(Hyieutils::TIEBaseBitmap* Source, Hyieutils::TIEBaseBitmap* SourceAlpha, Hyieutils::TIEBaseBitmap* Dest, Hyieutils::TIEBaseBitmap* DestAlpha, unsigned Width, unsigned Height, unsigned Mode, Hyiedefs::TIEProgressEvent OnProgressFunction = 0x0, System::TObject* OnProgressSender = (System::TObject*)(0x0));
public:
	/* TIEWICBaseFunctionality.Create */ inline __fastcall TIEWICBitmapScaler(void) : TIEWICBaseFunctionality() { }
	/* TIEWICBaseFunctionality.Destroy */ inline __fastcall virtual ~TIEWICBitmapScaler(void) { }
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
static const System::Int8 IE_WICBitmapDitherTypeNone = System::Int8(0x0);
static const System::Int8 IE_WICBitmapDitherTypeSolid = System::Int8(0x0);
static const System::Int8 IE_WICBitmapDitherTypeOrdered4x4 = System::Int8(0x1);
static const System::Int8 IE_WICBitmapDitherTypeOrdered8x8 = System::Int8(0x2);
static const System::Int8 IE_WICBitmapDitherTypeOrdered16x16 = System::Int8(0x3);
static const System::Int8 IE_WICBitmapDitherTypeSpiral4x4 = System::Int8(0x4);
static const System::Int8 IE_WICBitmapDitherTypeSpiral8x8 = System::Int8(0x5);
static const System::Int8 IE_WICBitmapDitherTypeDualSpiral4x4 = System::Int8(0x6);
static const System::Int8 IE_WICBitmapDitherTypeDualSpiral8x8 = System::Int8(0x7);
static const System::Int8 IE_WICBitmapDitherTypeErrorDiffusion = System::Int8(0x8);
static const System::Int8 IE_WICBitmapPaletteTypeCustom = System::Int8(0x0);
static const System::Int8 IE_WICBitmapPaletteTypeMedianCut = System::Int8(0x1);
static const System::Int8 IE_WICBitmapPaletteTypeFixedBW = System::Int8(0x2);
static const System::Int8 IE_WICBitmapPaletteTypeFixedHalftone8 = System::Int8(0x3);
static const System::Int8 IE_WICBitmapPaletteTypeFixedHalftone27 = System::Int8(0x4);
static const System::Int8 IE_WICBitmapPaletteTypeFixedHalftone64 = System::Int8(0x5);
static const System::Int8 IE_WICBitmapPaletteTypeFixedHalftone125 = System::Int8(0x6);
static const System::Int8 IE_WICBitmapPaletteTypeFixedHalftone216 = System::Int8(0x7);
static const System::Int8 IE_WICBitmapPaletteTypeFixedWebPalette = System::Int8(0x7);
static const System::Int8 IE_WICBitmapPaletteTypeFixedHalftone252 = System::Int8(0x8);
static const System::Int8 IE_WICBitmapPaletteTypeFixedHalftone256 = System::Int8(0x9);
static const System::Int8 IE_WICBitmapPaletteTypeFixedGray4 = System::Int8(0xa);
static const System::Int8 IE_WICBitmapPaletteTypeFixedGray16 = System::Int8(0xb);
static const System::Int8 IE_WICBitmapPaletteTypeFixedGray256 = System::Int8(0xc);
static const int IE_WICBITMAPPALETTETYPE_FORCE_DWORD = int(0x7fffffff);
static const System::Int8 IE_WICBitmapInterpolationModeNearestNeighbor = System::Int8(0x0);
static const System::Int8 IE_WICBitmapInterpolationModeLinear = System::Int8(0x1);
static const System::Int8 IE_WICBitmapInterpolationModeCubic = System::Int8(0x2);
static const System::Int8 IE_WICBitmapInterpolationModeFant = System::Int8(0x3);
extern DELPHI_PACKAGE void __fastcall IEHDPRead(System::Classes::TStream* Stream, Hyieutils::TIEBitmap* Bitmap, Imageenio::TIOParamsVals* &IOParams, Hyiedefs::TProgressRec &xProgress, bool Preview);
extern DELPHI_PACKAGE void __fastcall IEHDPWrite(System::Classes::TStream* Stream, Hyieutils::TIEBitmap* Bitmap, Imageenio::TIOParamsVals* &IOParams, Hyiedefs::TProgressRec &xProgress);
extern DELPHI_PACKAGE int __fastcall IEHDPFrameCount(const System::WideString FileName);
extern DELPHI_PACKAGE bool __fastcall IEWICAvailable(void);
extern DELPHI_PACKAGE void __fastcall IEWICResample(Hyieutils::TIEBaseBitmap* SrcImg, Hyieutils::TIEBaseBitmap* DstImg, Hyieutils::TIEBaseBitmap* SrcAlpha, Hyiedefs::TResampleFilter FilterType, Hyiedefs::TIEProgressEvent OnProgressFunction, System::TObject* OnProgressSender);
}	/* namespace Iewic */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_IEWIC)
using namespace Iewic;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// IewicHPP
