Hola gente, necesito leer una imagen bmp/jpg agregarle un texto y guardarla.
Saludos.
Jorge
function TextOnImage()
local hBmp
local cSrcImage := "c:\fwh\bitmaps\olga1.jpg"
local cDstImage := "olganame.jpg"
local cText := "Olga" + CRLF + "Kurylenko"
local oFont, oLarg, oSmal
DEFINE FONT oLarg NAME "VERDANA" SIZE 0,-50
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-30
DEFINE FONT oSmal NAME "TAHOMA" SIZE 0,-16
hBmp := FW_MakeYourBitmap( 352, 450, <|hDC, w, h |
FW_DrawImage( hDC, cSrcImage, { 0, 0, h, w } )
FW_SayText( hDC, cText, { 0, 0, h-30, w }, "B", { oLarg, oFont } )
FW_SayText( hDC, "FWH Image Functions", { 30, 0, h, w }, "T", oSmal )
return nil
> )
FW_SaveImage( hBmp, cDstImage, 100 )
XImage( cDstImage )
// cleanup
DeleteObject( hBmp )
RELEASE FONT oLarg,oFont, oSmal
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 63 guests