D
DaveL
hello
I have a Bit map 1367 wide 32 high
this bitmap contains like 40 separate Images
32x32
I tell it the id*32 to get the approiate Image from
the source Bitmap
When i CreateGraphics() From the Standard CreateGraphics() function the code
below works
perfect..
when i CreateGraphics.FromImage()
the Resuting Bitmap is Not Copied Right.... i think. when i assign the
bitmap to a picturebox or button its not correct
can anybody tell me what the problem is here
int Id=10;
Rectangle Rect = new Rectangle(new Point(Id*32, 0), new Size(32,
32));
Bitmap bmp = new Bitmap(Rect.Width, Rect.Height);
//Graphics g = Graphics.FromImage(bmp); // draws to
bitmap but is all messed up
Graphics g = CreateGraphics(); //
works perfect with this but draws to the window at 0,0 i want a bitmap back
g.DrawImage(Source, 0, 0, Rect, GraphicsUnit.Pixel);
g.Dispose();
Thanks DaveL
I have a Bit map 1367 wide 32 high
this bitmap contains like 40 separate Images
32x32
I tell it the id*32 to get the approiate Image from
the source Bitmap
When i CreateGraphics() From the Standard CreateGraphics() function the code
below works
perfect..
when i CreateGraphics.FromImage()
the Resuting Bitmap is Not Copied Right.... i think. when i assign the
bitmap to a picturebox or button its not correct
can anybody tell me what the problem is here
int Id=10;
Rectangle Rect = new Rectangle(new Point(Id*32, 0), new Size(32,
32));
Bitmap bmp = new Bitmap(Rect.Width, Rect.Height);
//Graphics g = Graphics.FromImage(bmp); // draws to
bitmap but is all messed up
Graphics g = CreateGraphics(); //
works perfect with this but draws to the window at 0,0 i want a bitmap back
g.DrawImage(Source, 0, 0, Rect, GraphicsUnit.Pixel);
g.Dispose();
Thanks DaveL