Jump to content
Fivewin Brasil

Redimensionar bitmap [Resolvido]


Edu

Recommended Posts


 
                 o:=ownd:obar:acontrols[1]:hbitmap
                 if o<>0
                    hbmp:=ownd:obar:acontrols[1]:hbitmap
                    nbmpwidth := nbmpwidth(hbmp)
                    nbmpheight:= nbmpheight(hbmp)   
                    larg:=nbmpwidth*nfactorwitdh
                    alt:=nbmpheight*nfactorheight
                    o:=resizebmp(o,larg ,alt )
                    ownd:obar:acontrols[1]:hbitmap:=o
                 endif  
       

olá Eduardo, existe a função interna do fivewin RESIZEBMP()

Acima um exemplo de como eu uso para redimensionar o bitmap de uma buttonbar. creio que é só adaptar para o xbrowse.

Att.

William Adami

Link to comment
Share on other sites

Obrigado pela resposta amigo!

Resolvido!

Aproveitando a ocasião, procurei por esta função "resizebmp()" e descobri que se passar o quarto parametro = .t.

a imagem não perde qualidade. Você pode implementar na sua função também.

Syntax

ResizeBmp( hBitmap, nWidth, nHeight, lMaxRes ) –> hResizedBitmap

Parameters

hBitmap -> The handle of the bitmap to resize
nWidth, nHeight -> The new dimensions of the resized bitmap to create
lMaxRes -> Resizes it using the max quality as possible

Abraço.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...