Changeset 704 for trunk


Ignore:
Timestamp:
Apr 8, 2009, 1:01:10 AM (16 years ago)
Author:
イグトランス (egtra)
Message:

Bitmapクラスの追加
(#242)

Location:
trunk/ab5.0/ablib/src
Files:
1 added
2 edited

Legend:

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

    r703 r704  
    1414    Function NativeImage() As *GpImage
    1515        NativeImage = nativeImage
     16    End Function
     17
     18    Static Function FromFile(filename As String, useEmbeddedColorManagement = False As Boolean) As Image
     19        FromFile = FromFile(ToWCStr(filename), useEmbeddedColorManagement)
    1620    End Function
    1721
     
    4953        SetStatus(GdipGetImageType(nativeImage, imageType))
    5054        Select Case imageType
    51 '           Case ImageTypeBitmap
    52 '               FromNativeImage = New Bitmap(native)
     55            Case ImageTypeBitmap
     56                FromNativeImage = New Bitmap(native)
    5357'           Case ImageTypeMetafile
    5458'               FromNativeImage = New Metafile(native)
     
    7579    End Function
    7680
     81    Sub Save(filename As String, format As Imaging.ImageFormat)
     82        SaveImpl(ToWCStr(filename), format.Guid)
     83    End Sub
     84
    7785    Sub Save(filename As PCWSTR, format As Imaging.ImageFormat)
    7886        SaveImpl(filename, format.Guid)
     
    8795    End Sub
    8896*/
     97    Sub Save(filename As String, encoder As Imaging.ImageCodecInfo, encoderParams As Imaging.EncoderParameters)
     98        SaveImpl(ToWCStr(filename), encoder.Clsid, ToNativeEncoderParameters(encoderParams))
     99    End Sub
     100
    89101    Sub Save(filename As PCWSTR, encoder As Imaging.ImageCodecInfo, encoderParams As Imaging.EncoderParameters)
    90102        SaveImpl(filename, encoder.Clsid, ToNativeEncoderParameters(encoderParams))
  • trunk/ab5.0/ablib/src/GdiPlusFlat.ab

    r703 r704  
    388388Declare Function GdipCloneBitmapArea Lib "gdiplus.dll" (ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single, ByVal format As Long /*PixelFormat*/, ByVal srcBitmap As *GpBitmap, ByRef dstBitmap As *GpBitmap) As GpStatus
    389389Declare Function GdipCloneBitmapAreaI Lib "gdiplus.dll" (ByVal x As Long, ByVal y As Long, ByVal width As Long, ByVal height As Long, ByVal format As Long /*PixelFormat*/, ByVal srcBitmap As *GpBitmap, ByRef dstBitmap As *GpBitmap) As GpStatus
    390 Declare Function GdipBitmapLockBits Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByRef rect As GpRect, ByVal flags As DWord, ByVal format As Long /*PixelFormat*/, ByVal lockedBitmapData As *System.Drawing.Imaging.BitmapData) As GpStatus
     390Declare Function GdipBitmapLockBits Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByRef rect As GpRect, ByVal flags As DWord, ByVal format As Long /*PixelFormat*/, ByRef lockedBitmapData As System.Drawing.Imaging.BitmapData) As GpStatus
    391391Declare Function GdipBitmapUnlockBits Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByRef lockedBitmapData As System.Drawing.Imaging.BitmapData) As GpStatus
    392392Declare Function GdipBitmapGetPixel Lib "gdiplus.dll" (ByVal bitmap As *GpBitmap, ByVal x As Long, ByVal y As Long, ByRef color As ARGB) As GpStatus
Note: See TracChangeset for help on using the changeset viewer.