2

Lost on this one, I've developed a drag and drop area.

I have:

A set of images with x,y width and height all known A set of text labels, all with x,y,fontsize,text etc all known

How can I convert this into an image file so I can thumbnail it? Don't really know where to start.

2 Answers 2

1

Create a bitmap of the size you need, grab a graphics instance from it, and begin drawing.

Bitmap bmp = new Bitmap(height,width);
using gfx = Graphics.FromImage(bmp) {
  // then draw on the gfx instance, flush, and then save the bitmap.
  gfx.DrawString(...)//with your position information
  gfx.DrawImage(...)//with your position,font,text info
  gfx.Flush();
}
bmp.Save(...);
Sign up to request clarification or add additional context in comments.

Comments

1

See my answer for the question below that contains code for generating thumbnails on the fly:

Alternatives to System.Drawing for use with ASP.NET?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.