Generate image with text

Generate image with text

Postby Dave Zowasky » 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
User avatar
Dave Zowasky
 
Posts: 125
Joined: Wed Oct 19, 2005 2:28 pm
Location: Hudson Ohio

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Dave Zowasky » 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
User avatar
Dave Zowasky
 
Posts: 125
Joined: Wed Oct 19, 2005 2:28 pm
Location: Hudson Ohio

Postby Antonio Linares » Tue Jun 19, 2007 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Tue Jun 19, 2007 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Dave Zowasky » 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
User avatar
Dave Zowasky
 
Posts: 125
Joined: Wed Oct 19, 2005 2:28 pm
Location: Hudson Ohio


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 46 guests