Creates new Bitmap instance of given dimensions and pixel format.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public Sub New ( _
width As Integer, _
height As Integer, _
format As PixelFormat _
)
public Bitmap(
int width,
int height,
PixelFormat format
)
Type: System.Int32
Width of new bitmap (in pixels).Type: System.Int32
Height of new bitmap (in pixels).'Create bitmap with transparent background
Dim bitmapText As New Aurigma.GraphicsMill.Bitmap(150, 30, _
Aurigma.GraphicsMill.PixelFormat.Format32bppArgb)
Dim graphics As System.Drawing.Graphics = bitmapText.GetGdiplusGraphics()
'Set text output properties
Dim font As New System.Drawing.Font("Arial", 22, FontStyle.Bold)
Dim brush As New System.Drawing.SolidBrush(System.Drawing.Color.Red)
'Draw text
graphics.DrawString("Sample text", font, brush, 5, 5)
'Apply shadow effect on text
bitmapText.Transforms.Shadow(Aurigma.GraphicsMill.RgbColor.Black, 2, 2, 4, False)
'Apply glow effect on text
'bitmapText.Transforms.Glow(Aurigma.GraphicsMill.RgbColor.Blue, 1, 4, False)
'Convert to 24 bit images (merge alpha channel with white background)
bitmapText.Channels.DiscardAlpha(Aurigma.GraphicsMill.RgbColor.White)
//Create bitmap with transparent background
Aurigma.GraphicsMill.Bitmap bitmapText = new Aurigma.GraphicsMill.Bitmap(150, 30,
Aurigma.GraphicsMill.PixelFormat.Format32bppArgb);
System.Drawing.Graphics graphics = bitmapText.GetGdiplusGraphics();
//Set text output properties
System.Drawing.Font font = new System.Drawing.Font("Arial", 22, FontStyle.Bold);
System.Drawing.SolidBrush brush = new System.Drawing.SolidBrush(System.Drawing.Color.Red);
//Draw text
graphics.DrawString("Sample text", font, brush, 5, 5);
//Apply shadow effect on text
bitmapText.Transforms.Shadow(Aurigma.GraphicsMill.RgbColor.Black, 2, 2, 4, false);
//Apply glow effect on text
//bitmapText.Transforms.Glow(Aurigma.GraphicsMill.RgbColor.Blue, 1, 4, false);
//Convert to 24 bit images (merge alpha channel with white background)
bitmapText.Channels.DiscardAlpha(Aurigma.GraphicsMill.RgbColor.White);