source: trunk/ab5.0/ablib/src/Classes/System/Drawing/Imaging/misc.ab@ 635

Last change on this file since 635 was 635, checked in by NoWest, 16 years ago

名前空間への入れ忘れの修正と
ConsoleクラスのResetColorのバグへ対応。
正しい動作かご確認ください。

File size: 17.3 KB
Line 
1' Classes/System/Drawing/Imaging/misc.ab
2
3Namespace System
4Namespace Drawing
5Namespace Imaging
6
7TypeDef ARGB = DWord
8TypeDef ARGB64 = QWord
9
10Enum ColorMode
11 ARGB32 = 0
12 ARGB64 = 1
13End Enum
14
15Const ALPHA_SHIFT = 24 As DWord
16Const RED_SHIFT = 16 As DWord
17Const GREEN_SHIFT = 8 As DWord
18Const BLUE_SHIFT = 0 As DWord
19Const ALPHA_MASK = ((&hff As ARGB) << ALPHA_SHIFT)
20
21' In-memory pixel data formats:
22' bits 0-7 = format index
23' bits 8-15 = pixel size (in bits)
24' bits 16-23 = flags
25' bits 24-31 = reserved
26
27Enum PixelFormat
28 Indexed = &h00010000
29 Gdi = &h00020000
30 Alpha = &h00040000
31 PAlpha = &h00080000
32 Extended = &h00100000
33 Canonical = &h00200000
34
35 Undefined = 0
36 DontCare = 0
37
38 Format1bppIndexed = (1 Or ( 1 << 8) Or PixelFormat.Indexed Or PixelFormat.Gdi)
39 Format4bppIndexed = (2 Or ( 4 << 8) Or PixelFormat.Indexed Or PixelFormat.Gdi)
40 Format8bppIndexed = (3 Or ( 8 << 8) Or PixelFormat.Indexed Or PixelFormat.Gdi)
41 Format16bppGrayScale = (4 Or (16 << 8) Or PixelFormat.Extended)
42 Format16bppRGB555 = (5 Or (16 << 8) Or PixelFormat.Gdi)
43 Format16bppRGB565 = (6 Or (16 << 8) Or PixelFormat.Gdi)
44 Format16bppARGB1555 = (7 Or (16 << 8) Or PixelFormat.Alpha Or PixelFormat.Gdi)
45 Format24bppRGB = (8 Or (24 << 8) Or PixelFormat.Gdi)
46 Format32bppRGB = (9 Or (32 << 8) Or PixelFormat.Gdi)
47 Format32bppARGB = (10 Or (32 << 8) Or PixelFormat.Alpha Or PixelFormat.Gdi Or PixelFormat.Canonical)
48 Format32bppPARGB = (11 Or (32 << 8) Or PixelFormat.Alpha Or PixelFormat.PAlpha Or PixelFormat.Gdi)
49 Format48bppRGB = (12 Or (48 << 8) Or PixelFormat.Extended)
50 Format64bppARGB = (13 Or (64 << 8) Or PixelFormat.Alpha Or PixelFormat.Canonical Or PixelFormat.Extended)
51 Format64bppPARGB = (14 Or (64 << 8) Or PixelFormat.Alpha Or PixelFormat.PAlpha Or PixelFormat.Extended)
52 Max = 15
53End Enum
54
55Const GetPixelFormatSize(pixfmt) = ((((pixfmt As PixelFormat) >> 8) And &hff) As DWord)
56
57Const IsIndexedPixelFormat(pixfmt) = ((((pixfmt As PixelFormat) And PixelFormat.Indexed) <> 0) As BOOL)
58
59Const IsAlphaPixelFormat(pixfmt) = ((((pixfmt As PixelFormat) And PixelFormat.Alpha) <> 0) As BOOL)
60
61Const IsExtendedPixelFormat(pixfmt) = ((((pixfmt As PixelFormat) And PixelFormat.Extended) <> 0) As BOOL)
62
63Const IsCanonicalPixelFormat(pixfmt) = ((((pixfmt As PixelFormat) And PixelFormat.Canonical) <> 0) As BOOL)
64
65Enum PaletteFlags
66 PaletteFlagsHasAlpha = &h0001
67 PaletteFlagsGrayScale = &h0002
68 PaletteFlagsHalftone = &h0004
69End Enum
70
71Type Align(8) ColorPalette
72 Flags As DWord
73 Count As DWord
74 Entries[1] As ARGB
75End Type
76
77Enum ColorAdjustType
78 Default
79 Bitmap
80 Brush
81 Pen
82 Text
83 Count
84 Any
85End Enum
86
87Type ColorMatrix
88 m[5][5] As Single
89End Type
90
91Type ColorMap
92 OldColor As Color
93 NewColor As Color
94End Type
95
96Enum ColorMatrixFlag
97 Default = 0
98 SkipGrays = 1
99 AltGray = 2
100End Enum
101
102Enum ImageCodecFlags
103 Encoder = &h00000001
104 Decoder = &h00000002
105 SupportBitmap = &h00000004
106 SupportVector = &h00000008
107 SeekableEncode = &h00000010
108 BlockingDecode = &h00000020
109
110 Builtin = &h00010000
111 System = &h00020000
112 User = &h00040000
113End Enum
114
115Enum ImageLockMode
116 Read = &h0001
117 Write = &h0002
118 UserInputBuf= &h0004
119End Enum
120
121Type Align(8) BitmapData
122 Width As DWord
123 Height As DWord
124 Stride As Long
125 PixelFormat As PixelFormat
126 Scan0 As VoidPtr
127 Reserved As ULONG_PTR
128End Type
129
130Type Align(8) EncoderParameter
131 Guid As GUID
132 NumberOfValues As DWord
133 EncoderType As DWord '元はTypeという名前
134 Value As VoidPtr
135End Type
136
137Type Align(8) EncoderParameters
138 Count As DWord
139 Parameter[1] As EncoderParameter
140End Type
141
142Type Align(8) PropertyItem
143 id As PROPID
144 length As DWord
145 piType As Word
146 value As VoidPtr
147End Type
148
149Const PropertyTagTypeByte = 1
150Const PropertyTagTypeASCII = 2
151Const PropertyTagTypeShort = 3
152Const PropertyTagTypeLong = 4
153Const PropertyTagTypeRational = 5
154Const PropertyTagTypeUndefined = 7
155Const PropertyTagTypeSLONG = 9
156Const PropertyTagTypeSRational = 10
157
158Const PropertyTagExifIFD = &h8769
159Const PropertyTagGpsIFD = &h8825
160
161Const PropertyTagNewSubfileType = &h00FE
162Const PropertyTagSubfileType = &h00FF
163Const PropertyTagImageWidth = &h0100
164Const PropertyTagImageHeight = &h0101
165Const PropertyTagBitsPerSample = &h0102
166Const PropertyTagCompression = &h0103
167Const PropertyTagPhotometricInterp = &h0106
168Const PropertyTagThreshHolding = &h0107
169Const PropertyTagCellWidth = &h0108
170Const PropertyTagCellHeight = &h0109
171Const PropertyTagFillOrder = &h010A
172Const PropertyTagDocumentName = &h010D
173Const PropertyTagImageDescription = &h010E
174Const PropertyTagEquipMake = &h010F
175Const PropertyTagEquipModel = &h0110
176Const PropertyTagStripOffsets = &h0111
177Const PropertyTagOrientation = &h0112
178Const PropertyTagSamplesPerPixel = &h0115
179Const PropertyTagRowsPerStrip = &h0116
180Const PropertyTagStripBytesCount = &h0117
181Const PropertyTagMinSampleValue = &h0118
182Const PropertyTagMaxSampleValue = &h0119
183Const PropertyTagXResolution = &h011A ' Image resolution in width direction
184Const PropertyTagYResolution = &h011B ' Image resolution in height direction
185Const PropertyTagPlanarConfig = &h011C ' Image data arrangement
186Const PropertyTagPageName = &h011D
187Const PropertyTagXPosition = &h011E
188Const PropertyTagYPosition = &h011F
189Const PropertyTagFreeOffset = &h0120
190Const PropertyTagFreeByteCounts = &h0121
191Const PropertyTagGrayResponseUnit = &h0122
192Const PropertyTagGrayResponseCurve = &h0123
193Const PropertyTagT4Option = &h0124
194Const PropertyTagT6Option = &h0125
195Const PropertyTagResolutionUnit = &h0128 ' Unit of X and Y resolution
196Const PropertyTagPageNumber = &h0129
197Const PropertyTagTransferFuncition = &h012D
198Const PropertyTagSoftwareUsed = &h0131
199Const PropertyTagDateTime = &h0132
200Const PropertyTagArtist = &h013B
201Const PropertyTagHostComputer = &h013C
202Const PropertyTagPredictor = &h013D
203Const PropertyTagWhitePoint = &h013E
204Const PropertyTagPrimaryChromaticities = &h013F
205Const PropertyTagColorMap = &h0140
206Const PropertyTagHalftoneHints = &h0141
207Const PropertyTagTileWidth = &h0142
208Const PropertyTagTileLength = &h0143
209Const PropertyTagTileOffset = &h0144
210Const PropertyTagTileByteCounts = &h0145
211Const PropertyTagInkSet = &h014C
212Const PropertyTagInkNames = &h014D
213Const PropertyTagNumberOfInks = &h014E
214Const PropertyTagDotRange = &h0150
215Const PropertyTagTargetPrinter = &h0151
216Const PropertyTagExtraSamples = &h0152
217Const PropertyTagSampleFormat = &h0153
218Const PropertyTagSMinSampleValue = &h0154
219Const PropertyTagSMaxSampleValue = &h0155
220Const PropertyTagTransferRange = &h0156
221
222Const PropertyTagJPEGProc = &h0200
223Const PropertyTagJPEGInterFormat = &h0201
224Const PropertyTagJPEGInterLength = &h0202
225Const PropertyTagJPEGRestartInterval = &h0203
226Const PropertyTagJPEGLosslessPredictors = &h0205
227Const PropertyTagJPEGPointTransforms = &h0206
228Const PropertyTagJPEGQTables = &h0207
229Const PropertyTagJPEGDCTables = &h0208
230Const PropertyTagJPEGACTables = &h0209
231
232Const PropertyTagYCbCrCoefficients = &h0211
233Const PropertyTagYCbCrSubsampling = &h0212
234Const PropertyTagYCbCrPositioning = &h0213
235Const PropertyTagREFBlackWhite = &h0214
236
237Const PropertyTagICCProfile = &h8773 ' This TAG is defined by ICC
238 ' for embedded ICC in TIFF
239Const PropertyTagGamma = &h0301
240Const PropertyTagICCProfileDescriptor = &h0302
241Const PropertyTagSRGBRenderingIntent = &h0303
242
243Const PropertyTagImageTitle = &h0320
244Const PropertyTagCopyright = &h8298
245
246' Extra TAGs (Like Adobe Image Information tags etc.)
247
248Const PropertyTagResolutionXUnit = &h5001
249Const PropertyTagResolutionYUnit = &h5002
250Const PropertyTagResolutionXLengthUnit = &h5003
251Const PropertyTagResolutionYLengthUnit = &h5004
252Const PropertyTagPrintFlags = &h5005
253Const PropertyTagPrintFlagsVersion = &h5006
254Const PropertyTagPrintFlagsCrop = &h5007
255Const PropertyTagPrintFlagsBleedWidth = &h5008
256Const PropertyTagPrintFlagsBleedWidthScale = &h5009
257Const PropertyTagHalftoneLPI = &h500A
258Const PropertyTagHalftoneLPIUnit = &h500B
259Const PropertyTagHalftoneDegree = &h500C
260Const PropertyTagHalftoneShape = &h500D
261Const PropertyTagHalftoneMisc = &h500E
262Const PropertyTagHalftoneScreen = &h500F
263Const PropertyTagJPEGQuality = &h5010
264Const PropertyTagGridSize = &h5011
265Const PropertyTagThumbnailFormat = &h5012 ' 1 = JPEG, 0 = RAW RGB
266Const PropertyTagThumbnailWidth = &h5013
267Const PropertyTagThumbnailHeight = &h5014
268Const PropertyTagThumbnailColorDepth = &h5015
269Const PropertyTagThumbnailPlanes = &h5016
270Const PropertyTagThumbnailRawBytes = &h5017
271Const PropertyTagThumbnailSize = &h5018
272Const PropertyTagThumbnailCompressedSize = &h5019
273Const PropertyTagColorTransferFunction = &h501A
274Const PropertyTagThumbnailData = &h501B' RAW thumbnail bits in
275 ' JPEG format or RGB format
276 ' depends on
277 ' PropertyTagThumbnailFormat
278
279' Thumbnail related TAGs
280
281Const PropertyTagThumbnailImageWidth = &h5020 ' Thumbnail width
282Const PropertyTagThumbnailImageHeight = &h5021 ' Thumbnail height
283Const PropertyTagThumbnailBitsPerSample = &h5022 ' Number of bits per
284 ' component
285Const PropertyTagThumbnailCompression = &h5023 ' Compression Scheme
286Const PropertyTagThumbnailPhotometricInterp = &h5024 ' Pixel composition
287Const PropertyTagThumbnailImageDescription = &h5025 ' Image Tile
288Const PropertyTagThumbnailEquipMake = &h5026 ' Manufacturer of Image
289 ' Input equipment
290Const PropertyTagThumbnailEquipModel = &h5027 ' Model of Image input
291 ' equipment
292Const PropertyTagThumbnailStripOffsets = &h5028 ' Image data location
293Const PropertyTagThumbnailOrientation = &h5029 ' Orientation of image
294Const PropertyTagThumbnailSamplesPerPixel = &h502A ' Number of components
295Const PropertyTagThumbnailRowsPerStrip = &h502B ' Number of rows per strip
296Const PropertyTagThumbnailStripBytesCount = &h502C ' Bytes per compressed
297 ' strip
298Const PropertyTagThumbnailResolutionX = &h502D ' Resolution in width
299 ' direction
300Const PropertyTagThumbnailResolutionY = &h502E ' Resolution in height
301 ' direction
302Const PropertyTagThumbnailPlanarConfig = &h502F ' Image data arrangement
303Const PropertyTagThumbnailResolutionUnit = &h5030 ' Unit of X and Y
304 ' Resolution
305Const PropertyTagThumbnailTransferFunction = &h5031 ' Transfer function
306Const PropertyTagThumbnailSoftwareUsed = &h5032 ' Software used
307Const PropertyTagThumbnailDateTime = &h5033 ' File change date and
308 ' time
309Const PropertyTagThumbnailArtist = &h5034 ' Person who created the
310 ' image
311Const PropertyTagThumbnailWhitePoint = &h5035 ' White point chromaticity
312Const PropertyTagThumbnailPrimaryChromaticities = &h5036
313 ' Chromaticities of
314 ' primaries
315Const PropertyTagThumbnailYCbCrCoefficients = &h5037 ' Color space transforma-
316 ' tion coefficients
317Const PropertyTagThumbnailYCbCrSubsampling = &h5038 ' Subsampling ratio of Y
318 ' to C
319Const PropertyTagThumbnailYCbCrPositioning = &h5039 ' Y and C position
320Const PropertyTagThumbnailRefBlackWhite = &h503A ' Pair of black and white
321 ' reference values
322Const PropertyTagThumbnailCopyRight = &h503B ' CopyRight holder
323
324Const PropertyTagLuminanceTable = &h5090
325Const PropertyTagChrominanceTable = &h5091
326
327Const PropertyTagFrameDelay = &h5100
328Const PropertyTagLoopCount = &h5101
329
330Const PropertyTagPixelUnit = &h5110 ' Unit specifier for pixel/unit
331Const PropertyTagPixelPerUnitX = &h5111 ' Pixels per unit in X
332Const PropertyTagPixelPerUnitY = &h5112 ' Pixels per unit in Y
333Const PropertyTagPaletteHistogram = &h5113 ' Palette histogram
334
335' EXIF specific tag
336
337Const PropertyTagExifExposureTime = &h829A
338Const PropertyTagExifFNumber = &h829D
339
340Const PropertyTagExifExposureProg = &h8822
341Const PropertyTagExifSpectralSense = &h8824
342Const PropertyTagExifISOSpeed = &h8827
343Const PropertyTagExifOECF = &h8828
344
345Const PropertyTagExifVer = &h9000
346Const PropertyTagExifDTOrig = &h9003 ' Date & time of original
347Const PropertyTagExifDTDigitized = &h9004 ' Date & time of digital data generation
348
349Const PropertyTagExifCompConfig = &h9101
350Const PropertyTagExifCompBPP = &h9102
351
352Const PropertyTagExifShutterSpeed = &h9201
353Const PropertyTagExifAperture = &h9202
354Const PropertyTagExifBrightness = &h9203
355Const PropertyTagExifExposureBias = &h9204
356Const PropertyTagExifMaxAperture = &h9205
357Const PropertyTagExifSubjectDist = &h9206
358Const PropertyTagExifMeteringMode = &h9207
359Const PropertyTagExifLightSource = &h9208
360Const PropertyTagExifFlash = &h9209
361Const PropertyTagExifFocalLength = &h920A
362Const PropertyTagExifMakerNote = &h927C
363Const PropertyTagExifUserComment = &h9286
364Const PropertyTagExifDTSubsec = &h9290 ' Date & Time subseconds
365Const PropertyTagExifDTOrigSS = &h9291 ' Date & Time original subseconds
366Const PropertyTagExifDTDigSS = &h9292 ' Date & TIme digitized subseconds
367
368Const PropertyTagExifFPXVer = &hA000
369Const PropertyTagExifColorSpace = &hA001
370Const PropertyTagExifPixXDim = &hA002
371Const PropertyTagExifPixYDim = &hA003
372Const PropertyTagExifRelatedWav = &hA004 ' related sound file
373Const PropertyTagExifInterop = &hA005
374Const PropertyTagExifFlashEnergy = &hA20B
375Const PropertyTagExifSpatialFR = &hA20C ' Spatial Frequency Response
376Const PropertyTagExifFocalXRes = &hA20E ' Focal Plane X Resolution
377Const PropertyTagExifFocalYRes = &hA20F ' Focal Plane Y Resolution
378Const PropertyTagExifFocalResUnit = &hA210 ' Focal Plane Resolution Unit
379Const PropertyTagExifSubjectLoc = &hA214
380Const PropertyTagExifExposureIndex = &hA215
381Const PropertyTagExifSensingMethod = &hA217
382Const PropertyTagExifFileSource = &hA300
383Const PropertyTagExifSceneType = &hA301
384Const PropertyTagExifCfaPattern = &hA302
385
386Const PropertyTagGpsVer = &h0000
387Const PropertyTagGpsLatitudeRef = &h0001
388Const PropertyTagGpsLatitude = &h0002
389Const PropertyTagGpsLongitudeRef = &h0003
390Const PropertyTagGpsLongitude = &h0004
391Const PropertyTagGpsAltitudeRef = &h0005
392Const PropertyTagGpsAltitude = &h0006
393Const PropertyTagGpsGpsTime = &h0007
394Const PropertyTagGpsGpsSatellites = &h0008
395Const PropertyTagGpsGpsStatus = &h0009
396Const PropertyTagGpsGpsMeasureMode = &h00A
397Const PropertyTagGpsGpsDop = &h000B ' Measurement precision
398Const PropertyTagGpsSpeedRef = &h000C
399Const PropertyTagGpsSpeed = &h000D
400Const PropertyTagGpsTrackRef = &h000E
401Const PropertyTagGpsTrack = &h000F
402Const PropertyTagGpsImgDirRef = &h0010
403Const PropertyTagGpsImgDir = &h0011
404Const PropertyTagGpsMapDatum = &h0012
405Const PropertyTagGpsDestLatRef = &h0013
406Const PropertyTagGpsDestLat = &h0014
407Const PropertyTagGpsDestLongRef = &h0015
408Const PropertyTagGpsDestLong = &h0016
409Const PropertyTagGpsDestBearRef = &h0017
410Const PropertyTagGpsDestBear = &h0018
411Const PropertyTagGpsDestDistRef = &h0019
412Const PropertyTagGpsDestDist = &h001A
413
414Type ImageCodecInfo
415 Clsid As CLSID
416 FormatID As GUID
417 CodecName As PCWSTR
418 DllName As PCWSTR
419 FormatDescription As PCWSTR
420 FilenameExtension As PCWSTR
421 MimeType As PCWSTR
422 Flags As DWord
423 Version As DWord
424 SigCount As DWord
425 SigSize As DWord
426 SigPattern As *Byte
427 SigMask As DWord
428End Type
429
430Enum ColorChannelFlag
431 ColorChannelC = 0
432 ColorChannelM
433 ColorChannelY
434 ColorChannelK
435 ColorChannelLast
436End Enum
437
438End Namespace
439End Namespace
440End Namespace
Note: See TracBrowser for help on using the repository browser.