Saludos
Estamos evaluando desarrollar una soluci贸n para odontolog铆a, la imagen del diente requiere asignarle im谩genes seg煤n el diagnostico.
Saludos
Estamos evaluando desarrollar una soluci贸n para odontolog铆a, la imagen del diente requiere asignarle im谩genes seg煤n el diagnostico.
function ImageOverlay()
聽 聽local aImage1, aImage2, hBmp
聽 聽local cFile1 聽 := "c:\fwh\bitmaps\olga1.jpg"
聽 聽local cFile2 聽 := "c:\fwh\bitmaps\alphabmp\calendar.bmp"
聽 聽local cSave 聽 聽:= "overlay.png"
聽 聽aImage1 聽:= FW_ReadImage( nil, cFile1 ) // [3],[4] are width and height
聽 聽aImage2 聽:= FW_ReadImage( nil, cFile2 )
聽 聽hBmp 聽 聽 := FW_MakeYourBitmap( aImage1[ 3 ], aImage1[ 4 ], ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 { |hDC, w, h| PaintOverlay( hDC, w, h, aImage1, aImage2 ) } )
聽 聽PalBmpFree( aImage1 )
聽 聽PalBmpFree( aImage2 )
聽 聽FW_SaveImage( hBmp, cSave ) // cSave can be bmp,jpg,png
聽 聽DeleteObject( hBmp )
聽 聽XImage( cSave ) // Test the saved image
return nil
static function PaintOverlay( hDC, w, h, aImage1, aImage2 )
聽 聽local t,l
聽 聽FW_DrawImage( hDC, aImage1 )
聽 聽t 聽 聽 := h - aImage2[ 4 ] - 20
聽 聽l 聽 聽 := w - aImage2[ 3 ] - 20
聽 聽FW_DrawImage( hDC, aImage2, { t, l, t + aImage2[ 4 ], l + aImage2[ 3 ] } )
return nil
Rao
Saludos y Muchas gracias.
Rao
Saludos y gracias,
Actualmente utilizamos dos versiones de FW uno, muy viejo con xharbour .82 y otro con HB3.x, si es posible, la sintaxis con las funciones nativas de FW antes de implementar FW_FUNCTION.
What version of FWH you are using with Harbour?
cImage := GetPvProfString("Config","ImagenWnd",".\FapSoft.jpg",cIniFile)
聽 聽DEFINE BRUSH oBrush FILE cImage STRETCH // or RESIZE
聽 聽cImage2 := GetPvProfString("config","Image2",".\Zorra.jpg",cIniFile)
聽 聽DEFINE WINDOW oWnd MDI ;
聽 聽 聽 聽 聽 TITLE "WINCONT 聽 " ;
聽 聽 聽 聽 聽 BRUSH oBrush ; 聽
聽 聽 聽 聽 聽 ICON oIco
聽 聽//FW1204 Usando Bmp AlphaBlend con IMAGE 聽(Zorrita)
聽 聽@ 300, 60 IMAGE oImage2 FILENAME cImage2 NOBORDER SIZE 100,100 ADJUST OF oWnd:oWndClient
聽 聽oWnd:bPainted := { || ABPaint( oWnd:oWndClient:hDC, 60, 300, oImage2:hBitmap, 255 ) }Francisco,
Gracias.
Mr. Rao,
In your sample, can we also have multiply images combined ? Lets say Olga and then more then 1 layover on top.
For my webshop I see a interesting use of it...
Do we have to save the first image with layover and then do the function with the new image and next layover ? etc....
Or can we use the hBmp and do the conversion in 1 loop (No idea for the source sample ?)
You can put any number of images, paint text, etc in one go.