Page 1 of 1
Generate image with text
Posted: Mon Jun 18, 2007 10:59 pm
by Dave Zowasky
Hello all,
I need to get Ascii text data into any image file format. Any suggestions?
Thanks
Posted: Mon Jun 18, 2007 11:11 pm
by Antonio Linares
You can write text on top of an image:
oImage:Say( nRow, nCol, cText, ... )
Please review Class TWindow Method Say(). As Class TImage inherits from TControl and TControl from TWindow, then you can use Method Say() on a TImage object too
Posted: Mon Jun 18, 2007 11:50 pm
by Dave Zowasky
Antonio,
Thanks for the quick response.
My problem my be more complicated. I am looking to use freeimage
to create a tif.
I need to make the final image file contain the text.
The Image:say() does not modify the image object before I save it in freeimage.
Thanks
Posted: Tue Jun 19, 2007 8:19 am
by Antonio Linares
Dave,
Once you write on top of the image then you can do this:
DibWrite( "screen.bmp", DibFromBitmap( WndBitmap( oImage:hWnd ) ) )
Posted: Tue Jun 19, 2007 8:24 am
by Antonio Linares
If you need to save it in a different format from BMP, please review Class TImage Method SaveImage(), and modify it based on the previous msg source code
Posted: Tue Jun 19, 2007 11:57 am
by Dave Zowasky
Antonio,
It is looking good!
Thanks for the help