mapping bitmaps

atesh

Active member
Joined
Aug 2, 2003
Messages
41
Location
Washington State, USA
Can you show me brief code to do this: User selects bitmap files and enters the coordinates for each one to be put onto one large bitmap with all the selected images. Thanks.
 
Create a new Bitmap with certain dimentions, use it as your drawing surface.

Get a graphics object from the Bitmap
Graphics g= Graphics.FromImage(bmp);

Draw all the images onto the surface Bitmap.
g.DrawImage();
g.DrawImage();

Then in OnPaint or equivalent draw the surface Bitmap
e.DrawImage();
 
You can save it to disk as a Bmp, Gif, Jpg, Tif, Png...
You create your surface Bitmap just like any other:
Bitmap b=new Bitmap(300, 200);
Graphics g= Graphics.FromImage(b);
Use g to draw the other images.

b.Save("C:\bmp.png");
 
Back
Top