|
|
|
GDI+ Constants |
|
Image File Format Constants |
|
The
GdipGetImageRawFormat function returns a globally unique identifier (GUID)
that indicates the file format of an image. The following constants represent the GUIDs that identify those file formats.
|
|
ImageFormatBMP B96B3CAB-0728-11D3-9D7B-0000F81EF32E Indicates the Microsoft Windowsbitmap (BMP) format.
ImageFormatEMF B96B3CAC-0728-11D3-9D7B-0000F81EF32E Indicates the Enhanced Metafile (EMF) format.
ImageFormatEXIF B96B3CB2-0728-11D3-9D7B-0000F81EF32E Indicates the Exif (Exchangeable Image File) format.
ImageFormatGIF B96B3CB0-0728-11D3-9D7B-0000F81EF32E Indicates the Graphics Interchange Format (GIF) format.
ImageFormatIcon B96B3CB5-0728-11D3-9D7B-0000F81EF32E Indicates the Icon format.
ImageFormatJPEG B96B3CAE-0728-11D3-9D7B-0000F81EF32E Indicates the JPEG format.
ImageFormatMemoryBMP B96B3CAB-0728-11D3-9D7B-0000F81EF32E Indicates that the image was constructed from a memory bitmap.
ImageFormatPNG B96B3CAF-0728-11D3-9D7B-0000F81EF32E Indicates the Portable Network Graphics (PNG) format.
ImageFormatTIFF B96B3CB1-0728-11D3-9D7B-0000F81EF32E Indicates the Tagged Image File Format (TIFF) format.
ImageFormatUndefined B96B3CA9-0728-11D3-9D7B-0000F81EF32E Indicates that Windows GDI+ is unable to determine the format.
ImageFormatWMF B96B3CAD-0728-11D3-9D7B-0000F81EF32E Indicates the Windows Metafile Format (WMF) format.
PowerBASIC Syntax
$ImageFormatUndefined = GUID$("{B96B3CA9-0728-11D3-9D7B-0000F81EF32E}") $ImageFormatMemoryBMP = GUID$("{B96B3CAA-0728-11D3-9D7B-0000F81EF32E}") $ImageFormatBMP = GUID$("{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}") $ImageFormatEMF = GUID$("{B96B3CAC-0728-11D3-9D7B-0000F81EF32E}") $ImageFormatWMF = GUID$("{B96B3CAD-0728-11D3-9D7B-0000F81EF32E}") $ImageFormatJPEG = GUID$("{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}") $ImageFormatPNG = GUID$("{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}") $ImageFormatGIF = GUID$("{B96B3CB0-0728-11D3-9D7B-0000F81EF32E}") $ImageFormatTIFF = GUID$("{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}") $ImageFormatEXIF = GUID$("{B96B3CB2-0728-11D3-9D7B-0000F81EF32E}") $ImageFormatIcon = GUID$("{B96B3CB5-0728-11D3-9D7B-0000F81EF32E}")
|
|
Image Frame Dimension Constants |
|
The Graphics Interchange Format (GIF) and Tagged Image File Format (TIFF) image file formats enable you to store multiple frames in a single image file. Multiple frames in a GIF file are used for animation, so the frames are said to be in the time dimension. Multiple frames in a TIFF file are typically used as separate pages, so the frames are said to be in the page dimension.
The following constants represent globally unique identifiers (GUIDs) that identify the page and time dimensions.
|
|
FrameDimensionPage 7462DC86-6180-4C7E-8E3F-EE7333A7A483
FrameDimensionResolution 84236F7B-3BD3-428F-8DAB-4EA1439CA315
FrameDimensionTime 6AEDBD6D-3FB5-418A-83A6-7F45229DC872
PowerBASIC Syntax
$FrameDimensionTime = GUID$("{6AEDBD6D-3FB5-418A-83A6-7F45229DC872}") $FrameDimensionResolution = GUID$("{84236F7B-3BD3-428F-8DAB-4EA1439CA315}") $FrameDimensionPage = GUID$("{7462DC86-6180-4C7E-8E3F-EE7333A7A483}")
|
|
Image Encoder Constants |
|
The GdpiSaveImageToFile, GdpiSaveImageToStream, GdpiSaveAdd and GdpiSaveAddImage functions receive an EncoderParameters structure that contains an array of EncoderParameter objects. Each EncoderParameter object has a globally unique identifier (GUID) data member that specifies the parameter category. The following constants represent GUIDs that specify the various parameter categories.
|
|
EncoderChrominanceTable F2E455DC-09B3-4316-8260-676ADA32481C
EncoderColorDepth 66087055-AD66-4C7C-9A18-38A2310B8337
EncoderColorSpace
EncoderCompression E09D739D-CCD4-44EE-8EBA-3FBF8BE4FC58
EncoderLuminanceTable EDB33BCE-0266-4A77-B904-27216099E717
EncoderQuality 1D5BE4B5-FA4A-452D-9CDD-5DB35105E7EB
EncoderRenderMethod 6D42C53A-229A-4825-8BB7-5C99E2B9A8B8
EncoderSaveFlag 292266FC-AC40-47BF-8CFC-A85B89A655DE
EncoderScanMethod 3A4E2661-3109-4E56-8536-42C156E7DCFA
EncoderTransformation 8D0EB2D1-A58E-4EA8-AA14-108074B7B6F9
EncoderVersion 24D18C76-814A-41A4-BF53-1C219CCCF797
EncoderImageItems
EncoderSaveAsCMYK
PowerBASIC Syntax
$EncoderCompression = GUID$("{E09D739D-CCD4-44EE-8EBA-3FBF8BE4FC58}") $EncoderColorDepth = GUID$("{66087055-AD66-4C7C-9A18-38A2310B8337}") $EncoderScanMethod = GUID$("{3A4E2661-3109-4E56-8536-42C156E7DCFA}") $EncoderVersion = GUID$("{24D18C76-814A-41A4-BF53-1C219CCCF797}") $EncoderRenderMethod = GUID$("{6D42C53A-229A-4825-8BB7-5C99E2B9A8B8}") $EncoderQuality = GUID$("{1D5BE4B5-FA4A-452D-9CDD-5DB35105E7EB}") $EncoderTransformation = GUID$("{8D0EB2D1-A58E-4EA8-AA14-108074B7B6F9}") $EncoderLuminanceTable = GUID$("{EDB33BCE-0266-4A77-B904-27216099E717}") $EncoderChrominanceTable = GUID$("{F2E455DC-09B3-4316-8260-676ADA32481C}") $EncoderSaveFlag = GUID$("{292266FC-AC40-47BF-8CFC-A85B89A655DE}")
|
|
Image Pixel Format Constants |
|
The following constants specify various pixel formats used in bitmaps.
|
|
PixelFormat1bppIndexed 196865 Specifies that the format is 1 bit per pixel, indexed.
PixelFormat4bppIndexed 197634 Specifies that the format is 4 bits per pixel, indexed.
PixelFormat8bppIndexed 198659 Specifies that the format is 8 bits per pixel, indexed.
PixelFormat16bppARGB1555 397319 Specifies that the format is 16 bits per pixel; 1 bit is used for the alpha component, and 5 bits each are used for the red, green, and blue components.
PixelFormat16bppGrayScale 1052676 Specifies that the format is 16 bits per pixel, grayscale.
PixelFormat16bppRGB555 135173 Specifies that the format is 16 bits per pixel; 5 bits each are used for the red, green, and blue components. The remaining bit is not used.
PixelFormat16bppRGB565 135174 Specifies that the format is 16 bits per pixel; 5 bits are used for the red component, 6 bits are used for the green component, and 5 bits are used for the blue component.
PixelFormat24bppRGB 137224 Specifies that the format is 24 bits per pixel; 8 bits each are used for the red, green, and blue components.
PixelFormat32bppARGB 2498570 Specifies that the format is 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components.
PixelFormat32bppPARGB 925707 Specifies that the format is 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components. The red, green, and blue components are premultiplied according to the alpha component.
PixelFormat32bppRGB 139273 Specifies that the format is 32 bits per pixel; 8 bits each are used for the red, green, and blue components. The remaining 8 bits are not used.
PixelFormat48bppRGB 1060876 Specifies that the format is 48 bits per pixel; 16 bits each are used for the red, green, and blue components.
PixelFormat64bppARGB 3424269 Specifies that the format is 64 bits per pixel; 16 bits each are used for the alpha, red, green, and blue components.
PixelFormat64bppPARGB 1851406 Specifies that the format is 64 bits per pixel; 16 bits each are used for the alpha, red, green, and blue components. The red, green, and blue components are premultiplied according to the alpha component.
Remarks
PixelFormat48bppRGB, PixelFormat64bppARGB, and PixelFormat64bppPARGB use 16 bits per color component (channel). Microsoft Windows GDI+ version 1.0 can read 16-bits-per-channel images, but such images are converted to an 8-bits-per-channel format for processing, displaying, and saving.
PowerBASIC syntax
%PixelFormat1bppIndexed = 196865 %PixelFormat4bppIndexed = 197634 %PixelFormat8bppIndexed = 198659 %PixelFormat16bppGrayScale = 1052676 %PixelFormat16bppRGB555 = 135173 %PixelFormat16bppRGB565 = 135174 %PixelFormat16bppARGB1555 = 397319 %PixelFormat24bppRGB = 137224 %PixelFormat32bppRGB = 139273 %PixelFormat32bppARGB = 2498570 %PixelFormat32bppPARGB = 925707 %PixelFormat48bppRGB = 1060876 %PixelFormat64bppARGB = 3424269 %PixelFormat64bppPARGB = 1851406 %PixelFormatMax = 15
|
|
Image Property Tag Type Constants |
|
You can store and retrieve image metadata with the help of a PropertyItem structure. The type data member of a PropertyItem structure specifies the data type of the values stored in the value data member of that same PropertyItem structure.
The following constants can be assigned to the type data member of a PropertyItem structure.
|
|
PixelFormat4bppIndexed 197634 Specifies that the format is 4 bits per pixel, indexed.
PropertyTagTypeASCII 2 Specifies that the value data member is a null-terminated ASCII string. If you set the type data member of a PropertyItem object to PropertyTagTypeASCII, you should set the length data member to the length of the string including the NULL terminator. For example, the string HELLO would have a length of 6.
PropertyTagTypeByte 1 Specifies that the value data member is an array of bytes.
PropertyTagTypeLong 4 Specifies that the value data member is an array of unsigned long (32-bit) integers.
PropertyTagTypeRational 4 Specifies that the value data member is an array of pairs of unsigned long integers. Each pair represents a fraction; the first integer is the numerator and the second integer is the denominator.
PropertyTagTypeShort 3 Specifies that the value data member is an array of unsigned short (16-bit) integers.
PropertyTagTypeSLONG 9 Specifies that the value data member is an array of signed long (32-bit) integers.
PropertyTagTypeSRational 10 Specifies that the value data member is an array of pairs of signed long integers. Each pair represents a fraction; the first integer is the numerator and the second integer is the denominator.
PropertyTagTypeUndefined 7 Specifies that the value data member is an array of bytes that can hold values of any data type.
PowerBASIC Syntax
%PropertyTagTypeByte = 1 %PropertyTagTypeASCII = 2 %PropertyTagTypeShort = 3 %PropertyTagTypeLong = 4 %PropertyTagTypeRational = 5 %PropertyTagTypeUndefined = 7 %PropertyTagTypeSLONG = 9 %PropertyTagTypeSRational = 10
|
|
Image Property Tag Constants |
|
Several image file formats enable you to store metadata along with an image. Metadata is information about an image, for example, title, width, camera model, and artist. Microsoft Windows GDI+ provides a uniform way of storing and retrieving metadata from image files in the Tagged Image File Format (TIFF), JPEG, Portable Network Graphics (PNG), and Exchangeable Image File (EXIF) formats.
In GDI+, a piece of metadata is called a property item, and an individual property item is identified by a numerical constant called a property tag. You can store and retrieve metadata by calling the GdipSetPropertyItem and GdipGetPropertyItem functions, and you don't have to be concerned with the details of how a particular file format stores that metadata.
The following topics list and describe the property items supported by GDI+. The descriptions are brief and general so that they apply to a variety of file formats. For a detailed description of how a property item is used in a particular file format, see the specification for that file format. For links to several file format specifications, see Image File Format Specifications. For more information about metadata, see Reading and Writing Metadata and Image Property Tag Type Constants.
|
Property Tags in Numerical Order
The following table lists the Microsoft Windows GDI+ image property tags in numerical order.
|
Property tag |
Value |
|
PropertyTagGpsVer |
&H0000 |
|
PropertyTagGpsLatitudeRef |
&H0001 |
|
PropertyTagGpsLatitude |
&H0002 |
|
PropertyTagGpsLongitudeRef |
&H0003 |
|
PropertyTagGpsLongitude |
&H0004 |
|
PropertyTagGpsAltitudeRef |
&H0005 |
|
PropertyTagGpsAltitude |
&H0006 |
|
PropertyTagGpsGpsTime |
&H0007 |
|
PropertyTagGpsGpsSatellites |
&H0008 |
|
PropertyTagGpsGpsStatus |
&H0009 |
|
PropertyTagGpsGpsMeasureMode |
&H000A |
|
PropertyTagGpsGpsDop |
&H000B |
|
PropertyTagGpsSpeedRef |
&H000C |
|
PropertyTagGpsSpeed |
&H000D |
|
PropertyTagGpsTrackRef |
&H000E |
|
PropertyTagGpsTrack |
&H000F |
|
PropertyTagGpsImgDirRef |
&H0010 |
|
PropertyTagGpsImgDir |
&H0011 |
|
PropertyTagGpsMapDatum |
&H0012 |
|
PropertyTagGpsDestLatRef |
&H0013 |
|
PropertyTagGpsDestLat |
&H0014 |
|
PropertyTagGpsDestLongRef |
&H0015 |
|
PropertyTagGpsDestLong |
&H0016 |
|
PropertyTagGpsDestBearRef |
&H0017 |
|
PropertyTagGpsDestBear |
&H0018 |
|
PropertyTagGpsDestDistRef |
&H0019 |
|
PropertyTagGpsDestDist |
&H001A |
|
PropertyTagNewSubfileType |
&H00FE |
|
PropertyTagSubfileType |
&H00FF |
|
PropertyTagImageWidth |
&H0100 |
|
PropertyTagImageHeight |
&H0101 |
|
PropertyTagBitsPerSample |
&H0102 |
|
PropertyTagCompression |
&H0103 |
|
PropertyTagPhotometricInterp |
&H0106 |
|
PropertyTagThreshHolding |
&H0107 |
|
PropertyTagCellWidth |
&H0108 |
|
PropertyTagCellHeight |
&H0109 |
|
PropertyTagFillOrder |
&H010A |
|
PropertyTagDocumentName |
&H010D |
|
PropertyTagImageDescription |
&H010E |
|
PropertyTagEquipMake |
&H010F |
|
PropertyTagEquipModel |
&H0110 |
|
PropertyTagStripOffsets |
&H0111 |
|
PropertyTagOrientation |
&H0112 |
|
PropertyTagSamplesPerPixel |
&H0115 |
|
PropertyTagRowsPerStrip |
&H0116 |
|
PropertyTagStripBytesCount |
&H0117 |
|
PropertyTagMinSampleValue |
&H0118 |
|
PropertyTagMaxSampleValue |
&H0119 |
|
PropertyTagXResolution |
&H011A |
|
PropertyTagYResolution |
&H011B |
|
PropertyTagPlanarConfig |
&H011C |
|
PropertyTagPageName |
&H011D |
|
PropertyTagXPosition |
&H011E |
|
PropertyTagYPosition |
&H011F |
|
PropertyTagFreeOffset |
&H0120 |
|
PropertyTagFreeByteCounts |
&H0121 |
|
PropertyTagGrayResponseUnit |
&H0122 |
|
PropertyTagGrayResponseCurve |
&H0123 |
|
PropertyTagT4Option |
&H0124 |
|
PropertyTagT6Option |
&H0125 |
|
PropertyTagResolutionUnit |
&H0128 |
|
PropertyTagPageNumber |
&H0129 |
|
PropertyTagTransferFunction |
&H012D |
|
PropertyTagSoftwareUsed |
&H0131 |
|
PropertyTagDateTime |
&H0132 |
|
PropertyTagArtist |
&H013B |
|
PropertyTagHostComputer |
&H013C |
|
PropertyTagPredictor |
&H013D |
|
PropertyTagWhitePoint |
&H013E |
|
PropertyTagPrimaryChromaticities |
&H013F |
|
PropertyTagColorMap |
&H0140 |
|
PropertyTagHalftoneHints |
&H0141 |
|
PropertyTagTileWidth |
&H0142 |
|
PropertyTagTileLength |
&H0143 |
|
PropertyTagTileOffset |
&H0144 |
|
PropertyTagTileByteCounts |
&H0145 |
|
PropertyTagInkSet |
&H014C |
|
PropertyTagInkNames |
&H014D |
|
PropertyTagNumberOfInks |
&H014E |
|
PropertyTagDotRange |
&H0150 |
|
PropertyTagTargetPrinter |
&H0151 |
|
PropertyTagExtraSamples |
&H0152 |
|
PropertyTagSampleFormat |
&H0153 |
|
PropertyTagSMinSampleValue |
&H0154 |
|
PropertyTagSMaxSampleValue |
&H0155 |
|
PropertyTagTransferRange |
&H0156 |
|
PropertyTagJPEGProc |
&H0200 |
|
PropertyTagJPEGInterFormat |
&H0201 |
|
PropertyTagJPEGInterLength |
&H0202 |
|
PropertyTagJPEGRestartInterval |
&H0203 |
|
PropertyTagJPEGLosslessPredictors |
&H0205 |
|
PropertyTagJPEGPointTransforms |
&H0206 |
|
PropertyTagJPEGQTables |
&H0207 |
|
PropertyTagJPEGDCTables |
&H0208 |
|
PropertyTagJPEGACTables |
&H0209 |
|
PropertyTagYCbCrCoefficients |
&H0211 |
|
PropertyTagYCbCrSubsampling |
&H0212 |
|
PropertyTagYCbCrPositioning |
&H0213 |
|
PropertyTagREFBlackWhite |
&H0214 |
|
PropertyTagGamma |
&H0301 |
|
PropertyTagICCProfileDescriptor |
&H0302 |
|
PropertyTagSRGBRenderingIntent |
&H0303 |
|
PropertyTagImageTitle |
&H0320 |
|
PropertyTagResolutionXUnit |
&H5001 |
|
PropertyTagResolutionYUnit |
&H5002 |
|
PropertyTagResolutionXLengthUnit |
&H5003 |
|
PropertyTagResolutionYLengthUnit |
&H5004 |
|
PropertyTagPrintFlags |
&H5005 |
|
PropertyTagPrintFlagsVersion |
&H5006 |
|
PropertyTagPrintFlagsCrop |
&H5007 |
|
PropertyTagPrintFlagsBleedWidth |
&H5008 |
|
PropertyTagPrintFlagsBleedWidthScale |
&H5009 |
|
PropertyTagHalftoneLPI |
&H500A |
|
PropertyTagHalftoneLPIUnit |
&H500B |
|
PropertyTagHalftoneDegree |
&H500C |
|
PropertyTagHalftoneShape |
&H500D |
|
PropertyTagHalftoneMisc |
&H500E |
|
PropertyTagHalftoneScreen |
&H500F |
|
PropertyTagJPEGQuality |
&H5010 |
|
PropertyTagGridSize |
&H5011 |
|
PropertyTagThumbnailFormat |
&H5012 |
|
PropertyTagThumbnailWidth |
&H5013 |
|
PropertyTagThumbnailHeight |
&H5014 |
|
PropertyTagThumbnailColorDepth |
&H5015 |
|
PropertyTagThumbnailPlanes |
&H5016 |
|
PropertyTagThumbnailRawBytes |
&H5017 |
|
PropertyTagThumbnailSize |
&H5018 |
|
PropertyTagThumbnailCompressedSize |
&H5019 |
|
PropertyTagColorTransferFunction |
&H501A |
|
PropertyTagThumbnailData |
&H501B |
|
PropertyTagThumbnailImageWidth |
&H5020 |
|
PropertyTagThumbnailImageHeight |
&H5021 |
|
PropertyTagThumbnailBitsPerSample |
&H5022 |
|
PropertyTagThumbnailCompression |
&H5023 |
|
PropertyTagThumbnailPhotometricInterp |
&H5024 |
|
PropertyTagThumbnailImageDescription |
&H5025 |
|
PropertyTagThumbnailEquipMake |
&H5026 |
|
PropertyTagThumbnailEquipModel |
&H5027 |
|
PropertyTagThumbnailStripOffsets |
&H5028 |
|
PropertyTagThumbnailOrientation |
&H5029 |
|
PropertyTagThumbnailSamplesPerPixel |
&H502A |
|
PropertyTagThumbnailRowsPerStrip |
&H502B |
|
PropertyTagThumbnailStripBytesCount |
&H502C |
|
PropertyTagThumbnailResolutionX |
&H502D |
|
PropertyTagThumbnailResolutionY |
&H502E |
|
PropertyTagThumbnailPlanarConfig |
&H502F |
|
PropertyTagThumbnailResolutionUnit |
&H5030 |
|
PropertyTagThumbnailTransferFunction |
&H5031 |
|
PropertyTagThumbnailSoftwareUsed |
&H5032 |
|
PropertyTagThumbnailDateTime |
&H5033 |
|
PropertyTagThumbnailArtist |
&H5034 |
|
PropertyTagThumbnailWhitePoint |
&H5035 |
|
PropertyTagThumbnailPrimaryChromaticities |
&H5036 |
|
PropertyTagThumbnailYCbCrCoefficients |
&H5037 |
|
PropertyTagThumbnailYCbCrSubsampling |
&H5038 |
|
PropertyTagThumbnailYCbCrPositioning |
&H5039 |
|
PropertyTagThumbnailRefBlackWhite |
&H503A |
|
PropertyTagThumbnailCopyRight |
&H503B |
|
PropertyTagLuminanceTable |
&H5090 |
|
PropertyTagChrominanceTable |
&H5091 |
|
PropertyTagFrameDelay |
&H5100 |
|
PropertyTagLoopCount |
&H5101 |
|
PropertyTagGlobalPalette |
&H5102 |
|
PropertyTagIndexBackground |
&H5103 |
|
PropertyTagIndexTransparent |
&H5104 |
|
PropertyTagPixelUnit |
&H5110 |
|
PropertyTagPixelPerUnitX |
&H5111 |
|
PropertyTagPixelPerUnitY |
&H5112 |
|
PropertyTagPaletteHistogram |
&H5113 |
|
PropertyTagCopyright |
&H8298 |
|
PropertyTagExifExposureTime |