Can't find Graphics.FromImage
-
hi, I need to use Gaphics g = new Graphics.FromImage(bmp) but i could not find the method .FromImage. I've added namespace like
using System; using System.Data; using System.Text; using System.Web; using System.Drawing; using System.Drawing.Text; using System.Drawing.Imaging; using System.Security.Cryptography; using System.Drawing.Drawing2D;
why is it like this? -
hi, I need to use Gaphics g = new Graphics.FromImage(bmp) but i could not find the method .FromImage. I've added namespace like
using System; using System.Data; using System.Text; using System.Web; using System.Drawing; using System.Drawing.Text; using System.Drawing.Imaging; using System.Security.Cryptography; using System.Drawing.Drawing2D;
why is it like this? -
That is not possible.
FromImage
is a method, not a constructor, so you can not use it that way. If you skip thenew
keyword, it will work.--- Year happy = new Year(2007);
oh so i can just put it this way: Bitmap bmp = new Bitmap(width, height, PixelFormat.Format24bppRgb); Graphics gph = new Graphics(bmp)??
-
oh so i can just put it this way: Bitmap bmp = new Bitmap(width, height, PixelFormat.Format24bppRgb); Graphics gph = new Graphics(bmp)??