transfer text to image file

  • Thread starter Thread starter cfyam
  • Start date Start date
C

cfyam

I want read some texts from database, and transfer this words to an image
file, how can I do?
 
cfyam,

In order to do this, you will probably want to create a new Bitmap
instance. Once you have that, call the static FromImage method on the
Graphics class to get a Graphics instance that you can draw on. Finally,
call the DrawString method overloads to draw the text to the image.

You can then save the image, or do whatever you wish with it.

I know this sounds like blasphemy, but if you want high quality text
rendering, I found that the Java 2d API is much better than using GDI. I
had to create some text overlays for an AVI that I was editing, and found
GDI woefully insufficient. I expect this to change with Avalon (in
Longhorn) though.

Hope this helps.
 
Back
Top