Avatar

Avatar

Postby Natter » Mon Jan 18, 2021 10:48 am

Hi,

On sites, often, there is a round avatar of the user. Is it possible to create a similar one to FW ?
Natter
 
Posts: 1212
Joined: Mon May 14, 2007 9:49 am

Re: Avatar

Postby nageswaragunupudi » Tue Jan 19, 2021 3:49 am

Code: Select all  Expand view
function RoundImage()

   local hBmp, cSave := "olga1.bmp"

   hBmp  := FW_MakeYourBitmap( 450, 450, <|hDC|
               FW_DrawImage( hDC, "c:\fwh\bitmaps\olga1.jpg", { 0,0,450,450 },,"C" ) //,,,"TL" )
               return nil
               >, .T. )

   ? nBmpWidth( hBmp ), nBmpHeight( hBmp )

   FW_SaveImage( hBmp, "c:\fwh\bitmaps\olga_round.png" )
   DeleteObject( hBmp )

   ximage( "c:\fwh\bitmaps\olga_round.png" ) // test the result

return nil
 


Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10622
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Avatar

Postby Natter » Tue Jan 19, 2021 9:59 am

Thanks !
Natter
 
Posts: 1212
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 59 guests