Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
To err is human, to really foul things up requires a computer.
Posted

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();

C#
Posted
2 questions: (1) How do I create the bitmap to use as my drawing surface? and (2) After I draw the final image can I save it to hard disk as BMP?
To err is human, to really foul things up requires a computer.
Posted

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");

C#

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...