Page 1 of 1

Pngs not transparent

Posted: Wed Mar 02, 2016 9:10 am
by Silvio.Falconi
I insert on a folder a image
oImagen = TImage():Define(,"scaf.bmp" )
...

oGrid:adialogs[1]:bPainted := {|hDC| (PalBmpDraw( hDC, 0, 0, oImagen:hBitmap,, oGrid:adialogs[1]:nWidth, oGrid:adialogs[1]:nHeight,, .T.) ) }

and on this folder many btnbmp buttons with png file

@ nrow,ncol btnbmp oBtn[n] Filename aBmp[RA->RACOLORE] ;
SIZE nsizeW,nsizeh ;
Prompt str2lines(alltrim(Ra->Radesc)," ") ;
noborder CENTER;
font ofontsmall of oGrid:adialogs[1] ;
Action NIL

oBtn[n]:lTransparent:=.T.
oBtn[n]:oCursor:= cCursor




Image


How you can see the buttons are not transparent ... why ?

Re: Pngs not transparent

Posted: Wed Mar 02, 2016 10:06 am
by ukoenig
Silvio,

it seems, Your images are NOT transparent ( white background ) ?

I can check them for You if You want

Can You check with my testbuttons ( premultiplied alpha ) ?
If You like it, I can create them with any color You need ( 3D - style )

Image

Image

My FOLDER-test.
Like You can see NO PROBLEM

Image

@ 50, 50 BTNBMP oBtn[1] OF oFld1:aDialogs[3] ;
SIZE 70, 70 PIXEL TRANSPARENT ;
NOBORDER ;
FILENAME c_path1 + "Testbtn1.Png" ;
ACTION MsgAlert( "Buttontest" ) ;
CENTER


best regards
Uwe :?:

Re: Pngs not transparent

Posted: Wed Mar 02, 2016 11:57 am
by Silvio.Falconi
Uwe,
I tried and not run
I sent you a snapshot

Re: Pngs not transparent

Posted: Wed Mar 02, 2016 4:41 pm
by ukoenig
Silvio,

I tested with ALL possible folder-page-backgrounds
I couldn't find any problem.
Maybe my Testtool can help. I will give You a download-link

Image

best regards
Uwe :D

Re: Pngs not transparent

Posted: Wed Mar 02, 2016 9:30 pm
by ukoenig
Silvio,

A IMAGETEST

Image

BEST REGARDS
uWE :D

Re: Pngs not transparent

Posted: Wed Mar 02, 2016 10:42 pm
by Silvio.Falconi
I think the problem is i use a folder aand on this folder i use a panel because i must scroll it and on hi i have a bmp and on this bmp i insert btnbmp buttons made with png

Re: Pngs not transparent

Posted: Thu Mar 03, 2016 8:39 am
by Silvio.Falconi
Uwe,

here not run ok

Image


I saw :

if the PNG FILE is used as IMAGE control it is transparent

if the PNG FILE is used as btnbmp control it is not transparent!!!!

I sent you my test sample with your png file

Re: Pngs not transparent

Posted: Thu Mar 03, 2016 10:37 am
by ukoenig
Silvio,

I will send You Your EXTENDED test with the needed changes

Image

Do You still need some more buttons with different colors ?
I can create any color You like
brighter or darker or different gradient painting

Image

Image

Image

best regards
Uwe :D

Re: Pngs not transparent

Posted: Thu Mar 03, 2016 10:56 am
by Silvio.Falconi
Uwe ,
I need with the models I sent you

here not arrived your new test

Re: Pngs not transparent

Posted: Fri Mar 04, 2016 10:26 am
by Silvio.Falconi
Uwe,
how I can show png transparent as you test ?

Re: Pngs not transparent

Posted: Fri Mar 04, 2016 11:45 am
by ukoenig
Silvio,

I still wanted to include some images

each color
1 Button
1 small file
1 big file

include colors

white
black
green
red
blue
purple
yellow
sill more ?

Image

regards
Uwe :?:

Re: Pngs not transparent

Posted: Fri Mar 04, 2016 12:14 pm
by Silvio.Falconi
I need 10 colors type

Re: Pngs not transparent

Posted: Sat Mar 05, 2016 3:18 pm
by ukoenig
Silvio,

have a look at Your emails
The new sample is not completed for the moment ( resources to be added )
but includes all informations You are looking for.

best regards
Uwe :D