LoadBitmap

From SwinGame

LoadBitmap loads a bitmap from file into a Bitmap variable. This can then be drawn to the screen. Bitmaps can be of bmp, jpeg, gif, png, etc. Images may also contain alpha values, which will be drawn correctly by the API. All bitmaps must be freed using the FreeBitmap once you are finished with them. You can also set the key colour that will be treated as a transparent colour.

Where is it: SGSDK_GRAPHICS

Contents

Languages

Pascal

function LoadBitmap(pathToBitmap: String; transparent: Boolean; transparentColor: Colour): Bitmap;
function LoadBitmap(pathToBitmap : String): Bitmap;

C#

public Bitmap Graphics.LoadBitmap(string pathToBitmap, bool transparent, Color transparentColor);
public Bitmap Graphics.LoadBitmap(string pathToBitmap);

Visual Basic .NET

Public Function Graphics.LoadBitmap(ByVal pathToBitmap As String, ByVal transparent As Boolean, ByVal transparentColor As Color) As Bitmap
Public Function Graphics.LoadBitmap(ByVal pathToBitmap As String) As Bitmap

Visual Basic 6

Public Function Graphics.LoadBitmap(ByVal pathToBitmap As String) As Bitmap
Public Function Graphics.LoadBitmap_Transparent(ByVal pathToBitmap As String, ByVal transparent As Boolean, ByVal transparentColor As Long) As Bitmap

Example

Also See