📄 gdiputil.pas
字号:
{******************************************************************}
{ GDI+ Util }
{ }
{ home page : http://www.progdigy.com }
{ email : hgourvest@progdigy.com }
{ }
{ date : 15-02-2002 }
{ }
{ The contents of this file are used with permission, subject to }
{ the Mozilla Public License Version 1.1 (the "License"); you may }
{ not use this file except in compliance with the License. You may }
{ obtain a copy of the License at }
{ http://www.mozilla.org/MPL/MPL-1.1.html }
{ }
{ Software distributed under the License is distributed on an }
{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or }
{ implied. See the License for the specific language governing }
{ rights and limitations under the License. }
{ }
{ *****************************************************************}
unit GDIPUTIL;
interface
uses
Windows,
GDIPAPI,
GDIPOBJ;
function ValueTypeFromULONG(Type_: ULONG): String;
function GetMetaDataIDString(id: ULONG): string;
function GetEncoderClsid(format: String; out pClsid: TGUID): integer;
function GetStatus(Stat: TStatus): string;
function PixelFormatString(PixelFormat: TPixelFormat): string;
{from WinNT.h}
// creates a language identifier from a primary language identifier and a
// sublanguage identifier for the TStringFormat & TFontFamily class.
function MakeLangID(PrimaryLanguage, SubLanguage: LANGID): WORD;
implementation
function ValueTypeFromULONG(Type_: ULONG): String;
begin
case Type_ of
0 : result := 'Nothing';
1 : result := 'PropertyTagTypeByte';
2 : result := 'PropertyTagTypeASCII';
3 : result := 'PropertyTagTypeShort';
4 : result := 'PropertyTagTypeLong';
5 : result := 'PropertyTagTypeRational';
6 : result := 'Nothing';
7 : result := 'PropertyTagTypeUndefined';
8 : result := 'Nothing';
9 : result := 'PropertyTagTypeSLONG';
10: result := 'PropertyTagTypeSRational';
else
result := '<UnKnown>';
end;
end;
function GetMetaDataIDString(id: ULONG): string;
begin
case id of
PropertyTagExifIFD : result := 'PropertyTagExifIFD';
PropertyTagGpsIFD : result := 'PropertyTagGpsIFD';
PropertyTagNewSubfileType : result := 'PropertyTagNewSubfileType';
PropertyTagSubfileType : result := 'PropertyTagSubfileType';
PropertyTagImageWidth : result := 'PropertyTagImageWidth';
PropertyTagImageHeight : result := 'PropertyTagImageHeight';
PropertyTagBitsPerSample : result := 'PropertyTagBitsPerSample';
PropertyTagCompression : result := 'PropertyTagCompression';
PropertyTagPhotometricInterp : result := 'PropertyTagPhotometricInterp';
PropertyTagThreshHolding : result := 'PropertyTagThreshHolding';
PropertyTagCellWidth : result := 'PropertyTagCellWidth';
PropertyTagCellHeight : result := 'PropertyTagCellHeight';
PropertyTagFillOrder : result := 'PropertyTagFillOrder';
PropertyTagDocumentName : result := 'PropertyTagDocumentName';
PropertyTagImageDescription : result := 'PropertyTagImageDescription';
PropertyTagEquipMake : result := 'PropertyTagEquipMake';
PropertyTagEquipModel : result := 'PropertyTagEquipModel';
PropertyTagStripOffsets : result := 'PropertyTagStripOffsets';
PropertyTagOrientation : result := 'PropertyTagOrientation';
PropertyTagSamplesPerPixel : result := 'PropertyTagSamplesPerPixel';
PropertyTagRowsPerStrip : result := 'PropertyTagRowsPerStrip';
PropertyTagStripBytesCount : result := 'PropertyTagStripBytesCount';
PropertyTagMinSampleValue : result := 'PropertyTagMinSampleValue';
PropertyTagMaxSampleValue : result := 'PropertyTagMaxSampleValue';
PropertyTagXResolution : result := 'PropertyTagXResolution';
PropertyTagYResolution : result := 'PropertyTagYResolution';
PropertyTagPlanarConfig : result := 'PropertyTagPlanarConfig';
PropertyTagPageName : result := 'PropertyTagPageName';
PropertyTagXPosition : result := 'PropertyTagXPosition';
PropertyTagYPosition : result := 'PropertyTagYPosition';
PropertyTagFreeOffset : result := 'PropertyTagFreeOffset';
PropertyTagFreeByteCounts : result := 'PropertyTagFreeByteCounts';
PropertyTagGrayResponseUnit : result := 'PropertyTagGrayResponseUnit';
PropertyTagGrayResponseCurve : result := 'PropertyTagGrayResponseCurve';
PropertyTagT4Option : result := 'PropertyTagT4Option';
PropertyTagT6Option : result := 'PropertyTagT6Option';
PropertyTagResolutionUnit : result := 'PropertyTagResolutionUnit';
PropertyTagPageNumber : result := 'PropertyTagPageNumber';
PropertyTagTransferFuncition : result := 'PropertyTagTransferFuncition';
PropertyTagSoftwareUsed : result := 'PropertyTagSoftwareUsed';
PropertyTagDateTime : result := 'PropertyTagDateTime';
PropertyTagArtist : result := 'PropertyTagArtist';
PropertyTagHostComputer : result := 'PropertyTagHostComputer';
PropertyTagPredictor : result := 'PropertyTagPredictor';
PropertyTagWhitePoint : result := 'PropertyTagWhitePoint';
PropertyTagPrimaryChromaticities : result := 'PropertyTagPrimaryChromaticities';
PropertyTagColorMap : result := 'PropertyTagColorMap';
PropertyTagHalftoneHints : result := 'PropertyTagHalftoneHints';
PropertyTagTileWidth : result := 'PropertyTagTileWidth';
PropertyTagTileLength : result := 'PropertyTagTileLength';
PropertyTagTileOffset : result := 'PropertyTagTileOffset';
PropertyTagTileByteCounts : result := 'PropertyTagTileByteCounts';
PropertyTagInkSet : result := 'PropertyTagInkSet';
PropertyTagInkNames : result := 'PropertyTagInkNames';
PropertyTagNumberOfInks : result := 'PropertyTagNumberOfInks';
PropertyTagDotRange : result := 'PropertyTagDotRange';
PropertyTagTargetPrinter : result := 'PropertyTagTargetPrinter';
PropertyTagExtraSamples : result := 'PropertyTagExtraSamples';
PropertyTagSampleFormat : result := 'PropertyTagSampleFormat';
PropertyTagSMinSampleValue : result := 'PropertyTagSMinSampleValue';
PropertyTagSMaxSampleValue : result := 'PropertyTagSMaxSampleValue';
PropertyTagTransferRange : result := 'PropertyTagTransferRange';
PropertyTagJPEGProc : result := 'PropertyTagJPEGProc';
PropertyTagJPEGInterFormat : result := 'PropertyTagJPEGInterFormat';
PropertyTagJPEGInterLength : result := 'PropertyTagJPEGInterLength';
PropertyTagJPEGRestartInterval : result := 'PropertyTagJPEGRestartInterval';
PropertyTagJPEGLosslessPredictors : result := 'PropertyTagJPEGLosslessPredictors';
PropertyTagJPEGPointTransforms : result := 'PropertyTagJPEGPointTransforms';
PropertyTagJPEGQTables : result := 'PropertyTagJPEGQTables';
PropertyTagJPEGDCTables : result := 'PropertyTagJPEGDCTables';
PropertyTagJPEGACTables : result := 'PropertyTagJPEGACTables';
PropertyTagYCbCrCoefficients : result := 'PropertyTagYCbCrCoefficients';
PropertyTagYCbCrSubsampling : result := 'PropertyTagYCbCrSubsampling';
PropertyTagYCbCrPositioning : result := 'PropertyTagYCbCrPositioning';
PropertyTagREFBlackWhite : result := 'PropertyTagREFBlackWhite';
PropertyTagICCProfile : result := 'PropertyTagICCProfile';
PropertyTagGamma : result := 'PropertyTagGamma';
PropertyTagICCProfileDescriptor : result := 'PropertyTagICCProfileDescriptor';
PropertyTagSRGBRenderingIntent : result := 'PropertyTagSRGBRenderingIntent';
PropertyTagImageTitle : result := 'PropertyTagImageTitle';
PropertyTagCopyright : result := 'PropertyTagCopyright';
PropertyTagResolutionXUnit : result := 'PropertyTagResolutionXUnit';
PropertyTagResolutionYUnit : result := 'PropertyTagResolutionYUnit';
PropertyTagResolutionXLengthUnit : result := 'PropertyTagResolutionXLengthUnit';
PropertyTagResolutionYLengthUnit : result := 'PropertyTagResolutionYLengthUnit';
PropertyTagPrintFlags : result := 'PropertyTagPrintFlags';
PropertyTagPrintFlagsVersion : result := 'PropertyTagPrintFlagsVersion';
PropertyTagPrintFlagsCrop : result := 'PropertyTagPrintFlagsCrop';
PropertyTagPrintFlagsBleedWidth : result := 'PropertyTagPrintFlagsBleedWidth';
PropertyTagPrintFlagsBleedWidthScale : result := 'PropertyTagPrintFlagsBleedWidthScale';
PropertyTagHalftoneLPI : result := 'PropertyTagHalftoneLPI';
PropertyTagHalftoneLPIUnit : result := 'PropertyTagHalftoneLPIUnit';
PropertyTagHalftoneDegree : result := 'PropertyTagHalftoneDegree';
PropertyTagHalftoneShape : result := 'PropertyTagHalftoneShape';
PropertyTagHalftoneMisc : result := 'PropertyTagHalftoneMisc';
PropertyTagHalftoneScreen : result := 'PropertyTagHalftoneScreen';
PropertyTagJPEGQuality : result := 'PropertyTagJPEGQuality';
PropertyTagGridSize : result := 'PropertyTagGridSize';
PropertyTagThumbnailFormat : result := 'PropertyTagThumbnailFormat';
PropertyTagThumbnailWidth : result := 'PropertyTagThumbnailWidth';
PropertyTagThumbnailHeight : result := 'PropertyTagThumbnailHeight';
PropertyTagThumbnailColorDepth : result := 'PropertyTagThumbnailColorDepth';
PropertyTagThumbnailPlanes : result := 'PropertyTagThumbnailPlanes';
PropertyTagThumbnailRawBytes : result := 'PropertyTagThumbnailRawBytes';
PropertyTagThumbnailSize : result := 'PropertyTagThumbnailSize';
PropertyTagThumbnailCompressedSize : result := 'PropertyTagThumbnailCompressedSize';
PropertyTagColorTransferFunction : result := 'PropertyTagColorTransferFunction';
PropertyTagThumbnailData : result := 'PropertyTagThumbnailData';
PropertyTagThumbnailImageWidth : result := 'PropertyTagThumbnailImageWidth';
PropertyTagThumbnailImageHeight : result := 'PropertyTagThumbnailImageHeight';
PropertyTagThumbnailBitsPerSample : result := 'PropertyTagThumbnailBitsPerSample';
PropertyTagThumbnailCompression : result := 'PropertyTagThumbnailCompression';
PropertyTagThumbnailPhotometricInterp : result := 'PropertyTagThumbnailPhotometricInterp';
PropertyTagThumbnailImageDescription : result := 'PropertyTagThumbnailImageDescription';
PropertyTagThumbnailEquipMake : result := 'PropertyTagThumbnailEquipMake';
PropertyTagThumbnailEquipModel : result := 'PropertyTagThumbnailEquipModel';
PropertyTagThumbnailStripOffsets : result := 'PropertyTagThumbnailStripOffsets';
PropertyTagThumbnailOrientation : result := 'PropertyTagThumbnailOrientation';
PropertyTagThumbnailSamplesPerPixel : result := 'PropertyTagThumbnailSamplesPerPixel';
PropertyTagThumbnailRowsPerStrip : result := 'PropertyTagThumbnailRowsPerStrip';
PropertyTagThumbnailStripBytesCount : result := 'PropertyTagThumbnailStripBytesCount';
PropertyTagThumbnailResolutionX : result := 'PropertyTagThumbnailResolutionX';
PropertyTagThumbnailResolutionY : result := 'PropertyTagThumbnailResolutionY';
PropertyTagThumbnailPlanarConfig : result := 'PropertyTagThumbnailPlanarConfig';
PropertyTagThumbnailResolutionUnit : result := 'PropertyTagThumbnailResolutionUnit';
PropertyTagThumbnailTransferFunction : result := 'PropertyTagThumbnailTransferFunction';
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -