FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Generate image with text
Posts: 125
Joined: Wed Oct 19, 2005 02:28 PM
Generate image with text
Posted: Mon Jun 18, 2007 10:59 PM

Hello all,

I need to get Ascii text data into any image file format. Any suggestions?

Thanks

Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Generate image with text
Posted: Mon Jun 18, 2007 11:11 PM

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 125
Joined: Wed Oct 19, 2005 02:28 PM
Generate image with text
Posted: Mon Jun 18, 2007 11:50 PM

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

Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Generate image with text
Posted: Tue Jun 19, 2007 08:19 AM

Dave,

Once you write on top of the image then you can do this:

DibWrite( "screen.bmp", DibFromBitmap( WndBitmap( oImage:hWnd ) ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Generate image with text
Posted: Tue Jun 19, 2007 08:24 AM

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 125
Joined: Wed Oct 19, 2005 02:28 PM
Generate image with text
Posted: Tue Jun 19, 2007 11:57 AM

Antonio,

It is looking good!

Thanks for the help

Dave Zowasky
Com1 Software, Inc.
http://www.com1software.com
information@com1software.com
330 653-3771

Continue the discussion