📄 gdiplusimaging.h
字号:
/**************************************************************************\
*
* Copyright (c) 1999-2000 Microsoft Corporation
*
* Module Name:
*
* GdiplusImaging.h
*
* Abstract:
*
* GDI+ Imaging GUIDs
*
\**************************************************************************/
#ifndef _GDIPLUSIMAGING_H
#define _GDIPLUSIMAGING_H
//---------------------------------------------------------------------------
// Image file format identifiers
//---------------------------------------------------------------------------
DEFINE_GUID(ImageFormatUndefined, 0xb96b3ca9,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
DEFINE_GUID(ImageFormatMemoryBMP, 0xb96b3caa,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
DEFINE_GUID(ImageFormatBMP, 0xb96b3cab,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
DEFINE_GUID(ImageFormatEMF, 0xb96b3cac,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
DEFINE_GUID(ImageFormatWMF, 0xb96b3cad,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
DEFINE_GUID(ImageFormatJPEG, 0xb96b3cae,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
DEFINE_GUID(ImageFormatPNG, 0xb96b3caf,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
DEFINE_GUID(ImageFormatGIF, 0xb96b3cb0,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
DEFINE_GUID(ImageFormatTIFF, 0xb96b3cb1,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
DEFINE_GUID(ImageFormatEXIF, 0xb96b3cb2,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
DEFINE_GUID(ImageFormatIcon, 0xb96b3cb5,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
//---------------------------------------------------------------------------
// Predefined multi-frame dimension IDs
//---------------------------------------------------------------------------
DEFINE_GUID(FrameDimensionTime, 0x6aedbd6d,0x3fb5,0x418a,0x83,0xa6,0x7f,0x45,0x22,0x9d,0xc8,0x72);
DEFINE_GUID(FrameDimensionResolution, 0x84236f7b,0x3bd3,0x428f,0x8d,0xab,0x4e,0xa1,0x43,0x9c,0xa3,0x15);
DEFINE_GUID(FrameDimensionPage, 0x7462dc86,0x6180,0x4c7e,0x8e,0x3f,0xee,0x73,0x33,0xa7,0xa4,0x83);
//---------------------------------------------------------------------------
// Property sets
//---------------------------------------------------------------------------
DEFINE_GUID(FormatIDImageInformation, 0xe5836cbe,0x5eef,0x4f1d,0xac,0xde,0xae,0x4c,0x43,0xb6,0x08,0xce);
DEFINE_GUID(FormatIDJpegAppHeaders, 0x1c4afdcd,0x6177,0x43cf,0xab,0xc7,0x5f,0x51,0xaf,0x39,0xee,0x85);
//---------------------------------------------------------------------------
// Encoder parameter sets
//---------------------------------------------------------------------------
DEFINE_GUID(EncoderCompression, 0xe09d739d,0xccd4,0x44ee,0x8e,0xba,0x3f,0xbf,0x8b,0xe4,0xfc,0x58);
DEFINE_GUID(EncoderColorDepth, 0x66087055,0xad66,0x4c7c,0x9a,0x18,0x38,0xa2,0x31,0x0b,0x83,0x37);
DEFINE_GUID(EncoderScanMethod, 0x3a4e2661,0x3109,0x4e56,0x85,0x36,0x42,0xc1,0x56,0xe7,0xdc,0xfa);
DEFINE_GUID(EncoderVersion, 0x24d18c76,0x814a,0x41a4,0xbf,0x53,0x1c,0x21,0x9c,0xcc,0xf7,0x97);
DEFINE_GUID(EncoderRenderMethod, 0x6d42c53a,0x229a,0x4825,0x8b,0xb7,0x5c,0x99,0xe2,0xb9,0xa8,0xb8);
DEFINE_GUID(EncoderQuality, 0x1d5be4b5,0xfa4a,0x452d,0x9c,0xdd,0x5d,0xb3,0x51,0x05,0xe7,0xeb);
DEFINE_GUID(EncoderTransformation,0x8d0eb2d1,0xa58e,0x4ea8,0xaa,0x14,0x10,0x80,0x74,0xb7,0xb6,0xf9);
DEFINE_GUID(EncoderLuminanceTable,0xedb33bce,0x0266,0x4a77,0xb9,0x04,0x27,0x21,0x60,0x99,0xe7,0x17);
DEFINE_GUID(EncoderChrominanceTable,0xf2e455dc,0x09b3,0x4316,0x82,0x60,0x67,0x6a,0xda,0x32,0x48,0x1c);
DEFINE_GUID(EncoderSaveFlag,0x292266fc,0xac40,0x47bf,0x8c, 0xfc, 0xa8, 0x5b, 0x89, 0xa6, 0x55, 0xde);
DEFINE_GUID(CodecIImageBytes,0x025d1823,0x6c7d,0x447b,0xbb, 0xdb, 0xa3, 0xcb, 0xc3, 0xdf, 0xa2, 0xfc);
#ifdef _WIN32_WCE
interface DECLSPEC_UUID("025D1823-6C7D-447B-BBDB-A3CBC3DFA2FC")
#else
MIDL_INTERFACE("025D1823-6C7D-447B-BBDB-A3CBC3DFA2FC")
#endif // _WIN32_WCE
IImageBytes : public IUnknown
{
public:
// Return total number of bytes in the IStream
STDMETHOD(CountBytes)(
OUT UINT *pcb
) = 0;
// Locks "cb" bytes, starting from "ulOffset" in the stream, and returns the
// pointer to the beginning of the locked memory chunk in "ppvBytes"
STDMETHOD(LockBytes)(
IN UINT cb,
IN ULONG ulOffset,
OUT const VOID ** ppvBytes
) = 0;
// Unlocks "cb" bytes, pointed by "pvBytes", starting from "ulOffset" in the
// stream
STDMETHOD(UnlockBytes)(
IN const VOID *pvBytes,
IN UINT cb,
IN ULONG ulOffset
) = 0;
};
//--------------------------------------------------------------------------
// ImageCodecInfo structure
//--------------------------------------------------------------------------
class ImageCodecInfo
{
public:
CLSID Clsid;
GUID FormatID;
const WCHAR* CodecName;
const WCHAR* DllName;
const WCHAR* FormatDescription;
const WCHAR* FilenameExtension;
const WCHAR* MimeType;
DWORD Flags;
DWORD Version;
DWORD SigCount;
DWORD SigSize;
const BYTE* SigPattern;
const BYTE* SigMask;
};
//--------------------------------------------------------------------------
// Information flags about image codecs
//--------------------------------------------------------------------------
enum ImageCodecFlags
{
ImageCodecFlagsEncoder = 0x00000001,
ImageCodecFlagsDecoder = 0x00000002,
ImageCodecFlagsSupportBitmap = 0x00000004,
ImageCodecFlagsSupportVector = 0x00000008,
ImageCodecFlagsSeekableEncode = 0x00000010,
ImageCodecFlagsBlockingDecode = 0x00000020,
ImageCodecFlagsBuiltin = 0x00010000,
ImageCodecFlagsSystem = 0x00020000,
ImageCodecFlagsUser = 0x00040000
};
//---------------------------------------------------------------------------
// Access modes used when calling Image::LockBits
//---------------------------------------------------------------------------
enum ImageLockMode
{
ImageLockModeRead = 0x0001,
ImageLockModeWrite = 0x0002,
ImageLockModeUserInputBuf= 0x0004
};
//---------------------------------------------------------------------------
// Information about image pixel data
//---------------------------------------------------------------------------
class BitmapData
{
public:
UINT Width;
UINT Height;
INT Stride;
PixelFormat PixelFormat;
VOID* Scan0;
UINT_PTR Reserved;
};
//---------------------------------------------------------------------------
// Image flags
//---------------------------------------------------------------------------
enum ImageFlags
{
ImageFlagsNone = 0,
// Low-word: shared with SINKFLAG_x
ImageFlagsScalable = 0x0001,
ImageFlagsHasAlpha = 0x0002,
ImageFlagsHasTranslucent = 0x0004,
ImageFlagsPartiallyScalable = 0x0008,
// Low-word: color space definition
ImageFlagsColorSpaceRGB = 0x0010,
ImageFlagsColorSpaceCMYK = 0x0020,
ImageFlagsColorSpaceGRAY = 0x0040,
ImageFlagsColorSpaceYCBCR = 0x0080,
ImageFlagsColorSpaceYCCK = 0x0100,
// Low-word: image size info
ImageFlagsHasRealDPI = 0x1000,
ImageFlagsHasRealPixelSize = 0x2000,
// High-word
ImageFlagsReadOnly = 0x00010000,
ImageFlagsCaching = 0x00020000,
ImageFlagsValid = 0x00030000 //invalidate flag should be modified whenever a new flag is added
// currently only these two can be set
};
enum RotateFlipType
{
RotateNoneFlipNone = 0,
Rotate90FlipNone = 1,
Rotate180FlipNone = 2,
Rotate270FlipNone = 3,
RotateNoneFlipX = 4,
Rotate90FlipX = 5,
Rotate180FlipX = 6,
Rotate270FlipX = 7,
RotateNoneFlipY = Rotate180FlipX,
Rotate90FlipY = Rotate270FlipX,
Rotate180FlipY = RotateNoneFlipX,
Rotate270FlipY = Rotate90FlipX,
RotateNoneFlipXY = Rotate180FlipNone,
Rotate90FlipXY = Rotate270FlipNone,
Rotate180FlipXY = RotateNoneFlipNone,
Rotate270FlipXY = Rotate90FlipNone
};
//---------------------------------------------------------------------------
// Encoder Parameter structure
//---------------------------------------------------------------------------
class EncoderParameter
{
public:
GUID Guid; // GUID of the parameter
ULONG NumberOfValues; // Number of the parameter values
ULONG Type; // Value type, like ValueTypeLONG etc.
VOID* Value; // A pointer to the parameter values
};
//---------------------------------------------------------------------------
// Encoder Parameters structure
//---------------------------------------------------------------------------
class EncoderParameters
{
public:
UINT Count; // Number of parameters in this structure
EncoderParameter Parameter[1]; // Parameter values
};
//---------------------------------------------------------------------------
// Property Item
//---------------------------------------------------------------------------
class PropertyItem
{
public:
PROPID id; // ID of this property
ULONG length; // Length of the property value, in bytes
WORD type; // Type of the value, as one of TAG_TYPE_XXX
// defined above
UNALIGNED VOID * value; // property value
};
//---------------------------------------------------------------------------
// Image property types
//---------------------------------------------------------------------------
#define PropertyTagTypeByte 1
#define PropertyTagTypeASCII 2
#define PropertyTagTypeShort 3
#define PropertyTagTypeLong 4
#define PropertyTagTypeRational 5
#define PropertyTagTypeUndefined 7
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -