Avatar

Post Reply
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Avatar

Post by Natter »

Hi,

On sites, often, there is a round avatar of the user. Is it possible to create a similar one to FW ?
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Avatar

Post by nageswaragunupudi »

Code: Select all

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
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Re: Avatar

Post by Natter »

Thanks !
Post Reply