- Aurigma Graphics Mill 5.5 for .NET
- Introduction
- What's New?
- Overview of Features
- Getting Started
- Programming with Graphics Mill for .NET
- File Formats
- Graphics Mill for .NET Add-ons
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- AbortedException Class
- AdvancedPsdLibraryModule Class
- AviProcessorLibraryModule Class
- Bitmap Class
- Bitmap Members
- Bitmap Constructor
- Bitmap Constructor
- Bitmap Constructor (Bitmap)
- Bitmap Constructor (Stream)
- Bitmap Constructor (String)
- Bitmap Constructor (Int32[,], PixelFormat)
- Bitmap Constructor (Int32, Int32, PixelFormat)
- Bitmap Constructor (Int32[,], PixelFormat, ColorPalette)
- Bitmap Constructor (Int32, Int32, PixelFormat, ColorPalette)
- Bitmap Constructor (Color, Int32, Int32, PixelFormat)
- Bitmap Constructor (Color, Int32, Int32, PixelFormat, ColorPalette)
- Bitmap Methods
- Bitmap Properties
- Bitmap Events
- BitmapChange Enumeration
- BitmapChangedEventArgs Class
- BitmapChangedEventHandler Delegate
- BitmapChangingEventArgs Class
- BitmapChangingEventHandler Delegate
- BitmapData Class
- BitmapEmptyException Class
- BitmapLockedException Class
- BitmapSavingEventArgs Class
- BitmapSavingEventHandler Delegate
- BitmapStatisticsProvider Class
- ChannelsProvider Class
- CMAdobeModuleLoadException Class
- CMException Class
- CMInappropriateProfileException Class
- CMOpenProfileException Class
- CMTransformException Class
- CmykColor Class
- Color Class
- ColorAdjustmentProvider Class
- ColorChannel Enumeration
- ColorManagementProvider Class
- ColorPalette Class
- ColorPaletteEmptyException Class
- ColorPaletteType Enumeration
- ColorProfile Class
- ColorProfileClass Enumeration
- ColorSpace Enumeration
- ErrorEventArgs Class
- Exception Class
- GlobalSettings Class
- GraphicsMillLibraryModule Class
- GrayScaleColor Class
- Histogram Class
- HistogramMode Enumeration
- ILockable Interface
- IPixelFormatSupport Interface
- IStateNavigable Interface
- ISyncEvents Interface
- ISyncHandler Interface
- IUnitConverter Interface
- LibraryModuleAbstract Class
- LockableObject Class
- MediaProcessorLibraryModule Class
- MessageLoopNotPresentedException Class
- ObjectEmptyException Class
- ObjectLockedException Class
- ObjectNotOpenedException Class
- OperationNotCompletedException Class
- PixelFormat Enumeration
- PixelFormatUtils Class
- ProgressEventArgs Class
- ProgressEventHandler Delegate
- Rational Structure
- RgbColor Class
- StateRestoringEventArgs Class
- StateRestoringEventHandler Delegate
- StopEventHandler Delegate
- StreamWrapper Class
- SyncHandler Class
- SynchronizationMode Enumeration
- TimeoutException Class
- TransformsProvider Class
- TrialPeriodTimeException Class
- UnexpectedException Class
- Unit Enumeration
- UnitConverter Class
- UnitConverterHandler Class
- UnitConverterObject Class
- UnsignedRational Structure
- UnsupportedPixelFormatException Class
- Win32Exception Class
- ZipCompressor Class
- Aurigma.GraphicsMill.AjaxControls Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.Math Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.RedoUndo Namespace
- Aurigma.GraphicsMill.Codecs Namespace
- Aurigma.GraphicsMill.Drawing Namespace
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Aurigma.GraphicsMill.WebControls Namespace
- Aurigma.GraphicsMill.WinControls Namespace
- GraphicsMill Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.Math Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.RedoUndo Namespace (Client Class Library)
- Aurigma.GraphicsMill Namespace
- Samples
- Licensing
- Copyright Notices
This documentation is for the old version. Go to the latest Graphics Mill docs
Bitmap Constructor (Int32, Int32, PixelFormat)
Creates new Bitmap instance of given dimensions and pixel format.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
Visual Basic
Public Sub New ( _
width As Integer, _
height As Integer, _
format As PixelFormat _
)
C#
public Bitmap(
int width,
int height,
PixelFormat format
)
Parameters
- width
-
Type: System.Int32
Width of new bitmap (in pixels).
- height
-
Type: System.Int32
Height of new bitmap (in pixels).
- format
- Pixel format of new bitmap. If you specify indexed pixel format, uninitialized palette will be generated. You must fill entries yourself. Palette will have maximum possible for given pixel format colors number (2 colors for 1-bit images, 16 colors for 4-bit images, and 256 colors for 8-bit images).
Remarks
All pixel data are filled with 0. So if pixel format:- supports alpha channel image is fully transparent
- is RGB image is filled with black color
- is CMYK image is filled with white color
- is indexed image has color of the first palette entry
Examples
Visual Basic
'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)
C#
//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);