34,333
edits
Changes
→Instantiating a Bitmap and Creating a Graphics Object
graphicsObj = Graphics.FromImage(myBitmap);
graphicsObj.Dispose();
}
</pre>
Note that it is important to dispose of the Graphics Object before we exit the method to free up resources.
== Drawing onto the Bitmap ==