Changeset 703 for trunk


Ignore:
Timestamp:
Apr 7, 2009, 9:35:42 PM (16 years ago)
Author:
イグトランス (egtra)
Message:

Imageクラスを追加
(#242)

Location:
trunk/ab5.0/ablib/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/System/Drawing/Graphics.ab

    r701 r703  
    230230        End If
    231231        Dim graphics = 0 As *GpGraphics
    232         SetStatus(GdipGetImageGraphicsContext(image.nativeImage, graphics))
     232        SetStatus(GdipGetImageGraphicsContext(image.NativeImage, graphics))
    233233        Return New Graphics(graphics)
    234234    End Function
     
    12371237            getNativeImage = 0
    12381238        Else
    1239             getNativeImage = image.nativeImage
     1239            getNativeImage = image.NativeImage
    12401240        End If
    12411241    End Function
  • trunk/ab5.0/ablib/src/Classes/System/Drawing/Image.ab

    r701 r703  
    55
    66Class Image
     7    Implements IDisposable, ICloneable
    78Public
    89    Sub Image(native As *GpImage)
     
    1011    End Sub
    1112
     13    ' FromNativeImage推奨
    1214    Function NativeImage() As *GpImage
    13         Return nativeImage
    14     End Function
    15 'Private
     15        NativeImage = nativeImage
     16    End Function
     17
     18    Static Function FromFile(filename As PCWSTR, useEmbeddedColorManagement = False As Boolean) As Image
     19        Dim native As *GpImage
     20        If useEmbeddedColorManagement Then
     21            SetStatus(GdipLoadImageFromFileICM(filename, native))
     22        Else
     23            SetStatus(GdipLoadImageFromFile(filename, native))
     24        End If
     25        FromFile = FromNativeImage(native)
     26    End Function
     27
     28'   Static Function FromComStream(stream As IStream, useEmbeddedColorManagement = False As Boolean) As Image
     29'       Dim native As *GpImage
     30'       If useEmbeddedColorManagement Then
     31'           SetStatus(GdipLoadImageFromStreamICM(stream, native))
     32'       Else
     33'           SetStatus(GdipLoadImageFromStream(stream, native))
     34'       End If
     35'       FromComStream = FromNativeImage(native)
     36'   End Function
     37
     38'   Static Function FromABStream(stream As IO.Stream, useEmbeddedColorManagement = False As Boolean) As Image
     39'       Dim comStream = ComStreamFromABStream(stream)
     40'       Try
     41'           FromABStream = New FromComStream(comStream)
     42'       Finally
     43'           comStream.Release()
     44'       End Try
     45'   End Function
     46
     47    Static Function FromNativeImage(native As *GpImage) As Image
     48        Dim imageType = ImageTypeUnknown As ImageType
     49        SetStatus(GdipGetImageType(nativeImage, imageType))
     50        Select Case imageType
     51'           Case ImageTypeBitmap
     52'               FromNativeImage = New Bitmap(native)
     53'           Case ImageTypeMetafile
     54'               FromNativeImage = New Metafile(native)
     55            Case Else
     56                FromNativeImage = New Image(native)
     57        End Select
     58    End Function
     59
     60    Sub Dispose()
     61        If nativeImage <> 0 Then
     62            GdipDisposeImage(nativeImage)
     63        End If
     64        nativeImage = 0
     65    End Sub
     66
     67    Sub ~Image()
     68        Dispose()
     69    End Sub
     70
     71    Function Clone() As Image
     72        Dim cloned As *GpImage
     73        SetStatus(GdipCloneImage(nativeImage, cloned))
     74        Clone = FromNativeImage(cloned)
     75    End Function
     76
     77    Sub Save(filename As PCWSTR, format As Imaging.ImageFormat)
     78        SaveImpl(filename, format.Guid)
     79    End Sub
     80/*
     81    Sub Save(stream As IStream, format As Imaging.ImageFormat)
     82        SaveImpl(stream, format.Guid)
     83    End Sub
     84
     85    Sub Save(stream As IO.Stream, format As Imaging.ImageFormat)
     86        SaveImpl(stream, format.Guid)
     87    End Sub
     88*/
     89    Sub Save(filename As PCWSTR, encoder As Imaging.ImageCodecInfo, encoderParams As Imaging.EncoderParameters)
     90        SaveImpl(filename, encoder.Clsid, ToNativeEncoderParameters(encoderParams))
     91    End Sub
     92/*
     93    Sub Save(stream As IO.Stream, encoder As Imaging.ImageCodecInfo, encoderParams As Imaging.EncoderParameters)
     94        SaveImpl(stream, encoder.Clsid, ToNativeEncoderParameters(encoderParams))
     95    End Sub
     96
     97    Sub Save(stream As IStream, encoder As Imaging.ImageCodecInfo, encoderParams As Imaging.EncoderParameters)
     98        SaveImpl(stream, encoder.Clsid, ToNativeEncoderParameters(encoderParams))
     99    End Sub
     100*/
     101Private
     102    Static Function ToNativeEncoderParameters(encoderParams As Imaging.EncoderParameters) As *Gdiplus.EncoderParameters
     103        If ActiveBasic.IsNothing(encoderParams) Then
     104            ToNativeEncoderParameters = 0
     105        Else
     106            ToNativeEncoderParameters = encoderParams.Params
     107        End If
     108    End Function
     109
     110    Sub SaveImpl(filename As PCWSTR, ByRef clsidEncoder As CLSID, encoderParams = 0 As *Gdiplus.EncoderParameters)
     111        SetStatus(GdipSaveImageToFile(nativeImage, filename, clsidEncoder, encoderParams))
     112    End Sub
     113/*
     114    Sub SaveImpl(stream As IStream, ByRef clsidEncoder As CLSID, encoderParams = 0 As *Gdiplus.EncoderParameters)
     115        SetStatus(GdipSaveImageToStream(stream, clsidEncoder, encoderParams)
     116    End Sub
     117*/
     118Public
     119    Sub SaveAdd(encoderParams As Imaging.EncoderParameters)
     120        SetStatus(GdipSaveAdd(nativeImage, ByVal ToNativeEncoderParameters(encoderParams)))
     121    End Sub
     122
     123    Sub SaveAdd(newImage As Image, encoderParams As Imaging.EncoderParameters)
     124        If ActiveBasic.IsNothing(newImage) Then
     125            Throw New ArgumentNullException("newImage")
     126        End If
     127        SetStatus(GdipSaveAddImage(nativeImage, newImage.NativeImage, ByVal ToNativeEncoderParameters(encoderParams)))
     128    End Sub
     129
     130    Function PhysicalDimension() As SizeF
     131        With PhysicalDimension
     132            SetStatus(GdipGetImageDimension(nativeImage, .Width, .Height))
     133        End With
     134    End Function
     135/*
     136    Function GetBounds(pageUnit As GraphicsUnit) As RectangleF
     137        SetStatus(GdipGetImageBounds(nativeImage, pageUnit, GetBounds))
     138    End Function
     139*/
     140    Function Width() As DWord
     141        SetStatus(GdipGetImageWidth(nativeImage, Width))
     142    End Function
     143
     144    Function Height() As DWord
     145        SetStatus(GdipGetImageHeight(nativeImage, Height))
     146    End Function
     147
     148    Function Size() As Size
     149        Size.Width = This.Width
     150        Size.Height = This.Height
     151    End Function
     152
     153    Function HorizontalResolution() As Single
     154        SetStatus(GdipGetImageHorizontalResolution(nativeImage, HorizontalResolution))
     155    End Function
     156
     157    Function VerticalResolution() As Single
     158        SetStatus(GdipGetImageVerticalResolution(nativeImage, VerticalResolution))
     159    End Function
     160
     161    Function Flags() As DWord
     162        SetStatus(GdipGetImageFlags(nativeImage, Height))
     163    End Function
     164/*
     165    Status GetRawFormat(OUT GUID *format);
     166*/
     167'   Function PixelFormat() As Imaging.PixelFormat
     168'       SetStatus(GdipGetImagePixelFormat(nativeImage, PixelFormat))
     169'   End Function
     170
     171    ' Palette - GetPaletteSize/GetPalette/SetPalette
     172/*
     173    Image* GetThumbnailImage(IN UINT thumbWidth,
     174                             IN UINT thumbHeight,
     175                             IN GetThumbnailImageAbort callback = NULL,
     176                             IN VOID* callbackData = NULL);
     177*/
     178    ' FrameDimensionsList - GetFrameDimensionsCount/GetFrameDimensionsList
     179    ' GetFrameCount
     180    ' SelectActiveFrame
     181
     182    Sub RotateFlip(rotateFlipType As RotateFlipType)
     183        SetStatus(GdipImageRotateFlip(nativeImage, rotateFlipType))
     184    End Sub
     185
     186    ' PropertyIdList - GetPropertyCount/GetPropertyIdList
     187    ' GetPropertyItem - GetPropertyItemSize/GetPropertyItem
     188    ' PropertyItems - GetPropertySize/GetAllPropertyItems
     189    ' RemovePropertyItem
     190    ' SetPropertyItem
     191    ' GetEncoderParameterList - GetEncoderParameterList/GetEncoderParameterListSize
     192
     193Private
    16194    nativeImage As *GpImage
    17195End Class
    18196
     197Namespace Imaging
     198Class ImageCodecInfo
     199Public
     200    Sub ImageCodecInfo(ByRef nativeImageCodecInfo As Gdiplus.ImageCodecInfo)
     201        ici = nativeImageCodecInfo
     202    End Sub
     203   
     204    Function Clsid() As CLSID
     205        Clsid = ici.FormatID
     206    End Function
     207
     208    Function FormatID() As GUID
     209        FormatID = ici.FormatID
     210    End Function
     211
     212    Function CodecName() As String
     213        CodecName =  New String(ici.CodecName)
     214    End Function
     215
     216    Function DllName() As String
     217        DllName = New String(ici.DllName)
     218    End Function
     219
     220    Function FormatDescription() As String
     221        FormatDescription =  New String(ici.FormatDescription)
     222    End Function
     223
     224    Function FilenameExtension() As String
     225        FilenameExtension =  New String(ici.FilenameExtension)
     226    End Function
     227
     228'   Function Flags() As ImageCodecFlags
     229'       Flags = ici.Flags
     230'   End Function
     231
     232    Function Version() As DWord
     233        Version = ici.Version
     234    End Function
     235
     236    ' SignaturePatterns
     237    ' SignatureMasks
     238
     239    Static Function GetImageDecoders() As Collections.Generic.IEnumerable<ImageCodecInfo>
     240        Dim num As DWord
     241        Dim bufSize As DWord
     242        SetStatus(GdipGetImageDecodersSize(num, bufSize))
     243        Dim pici = GC_malloc_atomic(bufSize) As *Gdiplus.ImageCodecInfo
     244        SetStatus(GdipGetImageDecoders(num, bufSize, pici))
     245        GetImageDecoders = ImageCodecInfoPtrToEnumerable(pici, num)
     246    End Function
     247
     248    Static Function GetImageEncoders() As Collections.Generic.IEnumerable<ImageCodecInfo>
     249        Dim num As DWord
     250        Dim bufSize As DWord
     251        SetStatus(GdipGetImageEncodersSize(num, bufSize))
     252        Dim pici = GC_malloc_atomic(bufSize) As *Gdiplus.ImageCodecInfo
     253        SetStatus(GdipGetImageEncoders(num, bufSize, pici))
     254        GetImageEncoders = ImageCodecInfoPtrToEnumerable(pici, num)
     255    End Function
     256
     257Private
     258    Static Function ImageCodecInfoPtrToEnumerable(pici As *Gdiplus.ImageCodecInfo, n As DWord) As Collections.Generic.IEnumerable<ImageCodecInfo>
     259        Dim l = New Collections.Generic.List<ImageCodecInfo>(n)
     260        Dim i As DWord
     261        For i = 0 To ELM(n)
     262            l.Add(New ImageCodecInfo(pici[i]))
     263        Next
     264        Dim il = l As Collections.Generic.IList<ImageCodecInfo>
     265        ImageCodecInfoPtrToEnumerable = il
     266    End Function
     267
     268    ici As Gdiplus.ImageCodecInfo
     269End Class
     270
     271Class ImageFormat
     272Public
     273    Function Guid() As GUID
     274        Guid = guid
     275    End Function
     276
     277    Override Function Equals(y As Object) As Boolean
     278        If This.GetType().Equals(y.GetType()) Then
     279            Dim yi = y As ImageFormat
     280            Equals = IsEqualGUID(This.guid, yi.guid) As Boolean
     281        Else
     282            Equals = False
     283        End If
     284    End Function
     285
     286    Override Function GetHashCode() As Long
     287        GetHashCode = _System_HashFromGUID(guid)
     288    End Function
     289
     290    Static Function MemoryBmp() As ImageFormat
     291        Return New ImageFormat(Gdiplus.ImageFormatMemoryBMP)
     292    End Function
     293
     294    Static Function Bmp() As ImageFormat
     295        Return New ImageFormat(Gdiplus.ImageFormatBMP)
     296    End Function
     297
     298    Static Function Emf() As ImageFormat
     299        Return New ImageFormat(Gdiplus.ImageFormatEMF)
     300    End Function
     301
     302    Static Function Wmf() As ImageFormat
     303        Return New ImageFormat(Gdiplus.ImageFormatWMF)
     304    End Function
     305
     306    Static Function Jpeg() As ImageFormat
     307        Return New ImageFormat(Gdiplus.ImageFormatJPEG)
     308    End Function
     309
     310    Static Function Png() As ImageFormat
     311        Return New ImageFormat(Gdiplus.ImageFormatPNG)
     312    End Function
     313
     314    Static Function Gif() As ImageFormat
     315        Return New ImageFormat(Gdiplus.ImageFormatGIF)
     316    End Function
     317
     318    Static Function Tiff() As ImageFormat
     319        Return New ImageFormat(Gdiplus.ImageFormatTIFF)
     320    End Function
     321
     322    Static Function Exif() As ImageFormat
     323        Return New ImageFormat(Gdiplus.ImageFormatEXIF)
     324    End Function
     325
     326    Static Function Icon() As ImageFormat
     327        Return New ImageFormat(Gdiplus.ImageFormatIcon)
     328    End Function
     329
     330Private
     331    Sub ImageFormat(ByRef codecGuid As GUID)
     332        guid = codecGuid
     333    End Sub
     334
     335    guid As GUID
     336End Class
     337
     338Class EncoderParameters
     339Public
     340    Sub EncoderParameters()
     341        init(1)
     342    End Sub
     343
     344    Sub EncoderParameters(n As Long)
     345        init(n)
     346    End Sub
     347
     348    Function Params() As *EncoderParameter
     349        Params = eps->Parameter
     350    End Function
     351Private
     352    Sub init(n As Long)
     353        Dim size = SizeOf (Gdiplus.EncoderParameters) + SizeOf (EncoderParameter) * n
     354        eps = GC_malloc(size)
     355        ZeroMemory(eps, size)
     356        eps->Count = n
     357    End Sub
     358
     359    eps As *Gdiplus.EncoderParameters
     360End Class
     361End Namespace
     362
    19363End Namespace
    20364End Namespace
     365
     366Namespace Gdiplus
     367
     368Type ImageCodecInfo
     369    Clsid As CLSID
     370    FormatID As GUID
     371    CodecName As PCWSTR
     372    DllName As PCWSTR
     373    FormatDescription As PCWSTR
     374    FilenameExtension As PCWSTR
     375    MimeType As PCWSTR
     376    Flags As DWord
     377    Version As DWord
     378    SigCount As DWord
     379    SigSize As DWord
     380    SigPattern As *Byte
     381    SigMask As *Byte
     382End Type
     383
     384Type Align(8) EncoderParameters
     385    Count As DWord
     386    Parameter[0] As System.Drawing.Imaging.EncoderParameter
     387End Type
     388
     389End Namespace
  • trunk/ab5.0/ablib/src/Classes/System/Drawing/Imaging/misc.ab

    r700 r703  
    133133    EncoderType As DWord '元はTypeという名前
    134134    Value As VoidPtr
    135 End Type
    136 
    137 Type Align(8) EncoderParameters
    138     Count As DWord
    139     Parameter[0] As EncoderParameter
    140135End Type
    141136
     
    411406Const PropertyTagGpsDestDistRef     = &h0019
    412407Const PropertyTagGpsDestDist        = &h001A
    413 
    414 Type 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
    428 End Type
    429408
    430409Enum ColorChannelFlag
  • trunk/ab5.0/ablib/src/GdiPlus.ab

    r698 r703  
    1414'#require <Classes/System/Drawing/Imaging/misc.ab>
    1515'#require <Classes/System/Drawing/Imaging/MetafileHeader.ab>
     16
     17' GdiPlusImaging.ab
     18
     19Namespace Gdiplus
     20Dim ImageFormatUndefined = [&hb96b3ca9, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     21Dim ImageFormatMemoryBMP = [&hb96b3caa, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     22Dim ImageFormatBMP = [&hb96b3cab, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     23Dim ImageFormatEMF = [&hb96b3cac, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     24Dim ImageFormatWMF = [&hb96b3cad, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     25Dim ImageFormatJPEG = [&hb96b3cae, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     26Dim ImageFormatPNG = [&hb96b3caf, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     27Dim ImageFormatGIF = [&hb96b3cb0, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     28Dim ImageFormatTIFF = [&hb96b3cb1, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     29Dim ImageFormatEXIF = [&hb96b3cb2, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     30Dim ImageFormatIcon = [&hb96b3cb5, &h0728, &h11d3, [&h9d, &h7b, &h00, &h00, &hf8, &h1e, &hf3, &h2e]] As GUID
     31
     32Dim FrameDimensionTime = [&h6aedbd6d, &h3fb5, &h418a, [&h83, &ha6, &h7f, &h45, &h22, &h9d, &hc8, &h72]] As GUID
     33Dim FrameDimensionResolution = [&h84236f7b, &h3bd3, &h428f, [&h8d, &hab, &h4e, &ha1, &h43, &h9c, &ha3, &h15]] As GUID
     34Dim FrameDimensionPage = [&h7462dc86, &h6180, &h4c7e, [&h8e, &h3f, &hee, &h73, &h33, &ha7, &ha4, &h83]] As GUID
     35
     36Dim FormatIDImageInformation = [&he5836cbe, &h5eef, &h4f1d, [&hac, &hde, &hae, &h4c, &h43, &hb6, &h08, &hce]] As GUID
     37Dim FormatIDJpegAppHeaders = [&h1c4afdcd, &h6177, &h43cf, [&hab, &hc7, &h5f, &h51, &haf, &h39, &hee, &h85]] As GUID
     38
     39Dim EncoderCompression = [&he09d739d, &hccd4, &h44ee, [&h8e, &hba, &h3f, &hbf, &h8b, &he4, &hfc, &h58]] As GUID
     40Dim EncoderColorDepth = [&h66087055, &had66, &h4c7c, [&h9a, &h18, &h38, &ha2, &h31, &h0b, &h83, &h37]] As GUID
     41Dim EncoderScanMethod = [&h3a4e2661, &h3109, &h4e56, [&h85, &h36, &h42, &hc1, &h56, &he7, &hdc, &hfa]] As GUID
     42Dim EncoderVersion = [&h24d18c76, &h814a, &h41a4, [&hbf, &h53, &h1c, &h21, &h9c, &hcc, &hf7, &h97]] As GUID
     43Dim EncoderRenderMethod = [&h6d42c53a, &h229a, &h4825, [&h8b, &hb7, &h5c, &h99, &he2, &hb9, &ha8, &hb8]] As GUID
     44Dim EncoderQuality = [&h1d5be4b5, &hfa4a, &h452d, [&h9c, &hdd, &h5d, &hb3, &h51, &h05, &he7, &heb]] As GUID
     45Dim EncoderTransformation = [&h8d0eb2d1, &ha58e, &h4ea8, [&haa, &h14, &h10, &h80, &h74, &hb7, &hb6, &hf9]] As GUID
     46Dim EncoderLuminanceTable = [&hedb33bce, &h0266, &h4a77, [&hb9, &h04, &h27, &h21, &h60, &h99, &he7, &h17]] As GUID
     47Dim EncoderChrominanceTable = [&hf2e455dc, &h09b3, &h4316, [&h82, &h60, &h67, &h6a, &hda, &h32, &h48, &h1c]] As GUID
     48Dim EncoderSaveFlag = [&h292266fc, &hac40, &h47bf, [&h8c, &hfc, &ha8, &h5b, &h89, &ha6, &h55, &hde]] As GUID
     49
     50'#if GDIPVER >= &h0110
     51Dim EncoderColorSpace = [&hae7a62a0, &hee2c, &h49d8, [&h9d, &h7, &h1b, &ha8, &ha9, &h27, &h59, &h6e]] As GUID
     52Dim EncoderImageItems = [&h63875e13, &h1f1d, &h45ab, [&h91, &h95, &ha2, &h9b, &h60, &h66, &ha6, &h50]] As GUID
     53Dim EncoderSaveAsCMYK = [&ha219bbc9,  &ha9d,  &h4005, [ &ha3, &hee, &h3a, &h42, &h1b, &h8b, &hb0, &h6c]] As GUID
     54'#endif
     55
     56Dim CodecIImageBytes = [&h025d1823, &h6c7d, &h447b, [&hbb, &hdb, &ha3, &hcb, &hc3, &hdf, &ha2, &hfc]] As GUID
     57End Namespace
  • trunk/ab5.0/ablib/src/GdiPlusFlat.ab

    r701 r703  
    336336Declare Function GdipCloneImage Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef cloneImage As *GpImage) As GpStatus
    337337Declare Function GdipDisposeImage Lib "gdiplus.dll" (ByVal image As *GpImage) As GpStatus
    338 Declare Function GdipSaveImageToFile Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal filename As PCWSTR, ByRef clsidEncoder As CLSID, ByRef encoderParams As System.Drawing.Imaging.EncoderParameters) As GpStatus
    339 Declare Function GdipSaveImageToStream Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal stream As *IStream, ByRef clsidEncoder As CLSID, ByRef encoderParams As System.Drawing.Imaging.EncoderParameters) As GpStatus
    340 Declare Function GdipSaveAdd Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef encoderParams As System.Drawing.Imaging.EncoderParameters) As GpStatus
    341 Declare Function GdipSaveAddImage Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal newImage As *GpImage, ByRef encoderParams As System.Drawing.Imaging.EncoderParameters) As GpStatus
     338Declare Function GdipSaveImageToFile Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal filename As PCWSTR, ByRef clsidEncoder As CLSID, ByVal encoderParams As *Gdiplus.EncoderParameters) As GpStatus
     339Declare Function GdipSaveImageToStream Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal stream As *IStream, ByRef clsidEncoder As CLSID, ByVal encoderParams As *Gdiplus.EncoderParameters) As GpStatus
     340Declare Function GdipSaveAdd Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef encoderParams As Gdiplus.EncoderParameters) As GpStatus
     341Declare Function GdipSaveAddImage Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal newImage As *GpImage, ByRef encoderParams As Gdiplus.EncoderParameters) As GpStatus
    342342Declare Function GdipGetImageGraphicsContext Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef graphics As *GpGraphics) As GpStatus
    343343Declare Function GdipGetImageBounds Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef srcRect As GpRectF, ByRef srcUnit As GpUnit) As GpStatus
     
    353353Declare Function GdipGetImageThumbnail Lib "gdiplus.dll" (ByVal image As *GpImage, ByVal thumbWidth As DWord, ByVal thumbHeight As DWord, ByRef thumbImage As *GpImage, ByVal callback As GetThumbnailImageAbort, ByVal callbackData As VoidPtr) As GpStatus
    354354Declare Function GdipGetEncoderParameterListSize Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef clsidEncoder As CLSID, ByRef size As DWord) As GpStatus
    355 Declare Function GdipGetEncoderParameterList Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef clsidEncoder As CLSID, ByVal size As DWord, ByRef buffer As System.Drawing.Imaging.EncoderParameters) As GpStatus
     355Declare Function GdipGetEncoderParameterList Lib "gdiplus.dll" (ByVal image As *GpImage, ByRef clsidEncoder As CLSID, ByVal size As DWord, ByRef buffer As Gdiplus.EncoderParameters) As GpStatus
    356356Declare Function GdipImageGetFrameDimensionsCount Lib "gdiplus.dll" (ByRef image As *GpImage, ByRef count As DWord) As GpStatus
    357357Declare Function GdipImageGetFrameDimensionsList Lib "gdiplus.dll" (ByRef image As *GpImage, ByVal dimensionIDs As *GUID, ByVal count As DWord) As GpStatus
     
    577577Declare Function GdipGetMetafileDownLevelRasterizationLimit Lib "gdiplus.dll" (ByVal metafile As *GpMetafile, ByRef metafileRasterizationLimitDpi As DWord) As GpStatus
    578578Declare Function GdipGetImageDecodersSize Lib "gdiplus.dll" (ByRef numDecoders As DWord, ByRef size As DWord) As GpStatus
    579 Declare Function GdipGetImageDecoders Lib "gdiplus.dll" (ByVal numDecoders As DWord, ByVal size As DWord, ByVal decoders As *System.Drawing.Imaging.ImageCodecInfo) As GpStatus
     579Declare Function GdipGetImageDecoders Lib "gdiplus.dll" (ByVal numDecoders As DWord, ByVal size As DWord, ByVal decoders As *Gdiplus.ImageCodecInfo) As GpStatus
    580580Declare Function GdipGetImageEncodersSize Lib "gdiplus.dll" (ByRef numDecoders As DWord, ByRef size As DWord) As GpStatus
    581 Declare Function GdipGetImageEncoders Lib "gdiplus.dll" (ByVal numEncoders As DWord, ByVal size As DWord, ByVal encoderss As *System.Drawing.Imaging.ImageCodecInfo) As GpStatus
     581Declare Function GdipGetImageEncoders Lib "gdiplus.dll" (ByVal numEncoders As DWord, ByVal size As DWord, ByVal encoderss As *Gdiplus.ImageCodecInfo) As GpStatus
    582582Declare Function GdipComment Lib "gdiplus.dll" (ByVal graphics As *GpGraphics, ByVal sizeData As DWord, ByVal data As *Byte) As GpStatus
    583583
  • trunk/ab5.0/ablib/src/basic/function.sbp

    r634 r703  
    905905End Function
    906906
     907Function _System_HashFromGUID(ByRef guid As GUID) As Long
     908    Dim p = VarPtr(guid) As *DWord
     909    _System_HashFromGUID = (p[0] Xor p[1] Xor p[2] Xor p[3]) As Long
     910End Function
     911
    907912/*!
    908913@brief  ObjPtrの逆。ABオブジェクトを指すポインタをObject型へ変換。
Note: See TracChangeset for help on using the changeset viewer.