Salvar bitmap from resources transparent

Salvar bitmap from resources transparent

Postby Ari » Fri Nov 18, 2022 8:08 pm

Hello

I'm trying to record the bitmaps I have with transparent brackground, some and know how to do that?

I'll use it on the pages and there is a gray appearing in the background.

Code: Select all  Expand view

/*  ============================================================================== */
Function BmpTOFile( cNome, xhDC )
/*  ============================================================================== */
  local hDC, hDIB
  local cFile     := Lower("c:\xampp\htdocs\img\" + cNome + ".bmp")

  local cFileHtml := Lower('/img/'   + cNome + "
.bmp")
 
  if File( cFile ) ; return Lower(cNome) ; Endif
 
  DEFAULT xhDC := 0
 
  if xhDC == 0
     hDC      := LoadBitMap( GetResources(), cNome )                    
  Else
     hDC      := xhDC
  Endif

  if empty( hDC ) ; return Lower(cNome) ; Endif
     
  hDIB        := DibFromBitmap( hDC, 255 )

  DibWrite( cFile, hDIB )
 
return Lower(cNome)
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
User avatar
Ari
 
Posts: 228
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 46 guests