Reputation: 61773
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.
Upvotes: 2
Views: 2869
Reputation: 21112
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?
Upvotes: 1
Reputation: 11792
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(...);
Upvotes: 1