Pngs not transparent

Post Reply
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Pngs not transparent

Post 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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Pngs not transparent

Post 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 :?:
Last edited by ukoenig on Thu Mar 03, 2016 10:52 am, edited 2 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Pngs not transparent

Post by Silvio.Falconi »

Uwe,
I tried and not run
I sent you a snapshot
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Pngs not transparent

Post 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
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Pngs not transparent

Post by ukoenig »

Silvio,

A IMAGETEST

Image

BEST REGARDS
uWE :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Pngs not transparent

Post 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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Pngs not transparent

Post 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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Pngs not transparent

Post 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
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Pngs not transparent

Post by Silvio.Falconi »

Uwe ,
I need with the models I sent you

here not arrived your new test
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Pngs not transparent

Post by Silvio.Falconi »

Uwe,
how I can show png transparent as you test ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Pngs not transparent

Post 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 :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Pngs not transparent

Post by Silvio.Falconi »

I need 10 colors type
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Pngs not transparent

Post 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
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
Post Reply