指定したサイズ、ピクセル形式、およびピクセル データを使用して、Bitmap クラスの新しいインスタンスを初期化します。
名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
'宣言
Public Sub New ( _
width As Integer, _
height As Integer, _
stride As Integer, _
format As PixelFormat, _
scan0 As IntPtr _
)
'使用
Dim width As Integer
Dim height As Integer
Dim stride As Integer
Dim format As PixelFormat
Dim scan0 As IntPtr
Dim instance As New Bitmap(width, height, stride, format, scan0)
public Bitmap (
int width,
int height,
int stride,
PixelFormat format,
IntPtr scan0
)
public:
Bitmap (
int width,
int height,
int stride,
PixelFormat format,
IntPtr scan0
)
public Bitmap (
int width,
int height,
int stride,
PixelFormat format,
IntPtr scan0
)
public function Bitmap (
width : int,
height : int,
stride : int,
format : PixelFormat,
scan0 : IntPtr
)
パラメータ
- width
新しい Bitmap の幅 (ピクセル単位)。
- height
新しい Bitmap の高さ (ピクセル単位)。
- stride
スキャン ラインの間のバイト オフセット数を指定する整数値。これには、通常 (必須ではありません)、ピクセルあたりのバイト数という形式 (16 ビット/ピクセルの場合は 2) にビットマップの幅を乗じた値を指定します。このパラメータに渡す値は、4 の倍数である必要があります。
- format
新しい Bitmap の PixelFormat 列挙体。
- scan0
ピクセル データを格納するバイトの配列へのポインタ。
解説
scan0 パラメータで指定されたメモリ ブロックの割り当てと解放は呼び出し元が行いますが、関連する Bitmap が解放されるまでメモリは解放されません。
.NET Framework のセキュリティ
- SecurityPermission (アンマネージ コードを呼び出すために必要なアクセス許可)。UnmanagedCode (関連する列挙体)
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 2.0、1.1、1.0