png files on bmp

Post Reply
User avatar
MdaSolution
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

png files on bmp

Post by MdaSolution »

I must insert png transparent on a big bmp

can have a sample please
FWH .. BC582.. xharbour
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: png files on bmp

Post by ukoenig »

Do You want to know just a way how to do it,
or do You need a solution inside Your Application ?

To insert a PNG-File You can use Pixelformer.
1. Select < File > = < Import > open the PNG-File ( be sure, the Background is shown transparent )
2. From the menu < Edit > => < Select all > => again < Edit > => < Copy >
3. Select < File > => < Import > open the BMP-File
4. Select < Edit > => < Paste >
The PNG-File is shown on Top of the BMP-File.
5. Select the Move-Tool to adjust the PNG-File
6. Select < File > => < Export > ( to the Format You need )

Image

Best regards
Uwe :lol:
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
MdaSolution
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: png files on bmp

Post by MdaSolution »

I must insert and show symbols on my class Tsection YOU can see on a old topic of this week
I need this class to show section of images
and Now I must insert on each images symbols : I wish have png files


this in buttonbar

DEFINE BUTTON OF oBar Resource "btn22" tooltip "New symbol" NOBORDER ;
ACTION (oSymbol:=cGetFile( "*.png", "Select a file" ),Inser_Symbol( oSection, oSymbol))
....

the function

FUNCTION Inser_Symbol( oSection, cbmpfile )
local oBmpSymbol
if File( cBmpFile )
hDC:= oSection:oBmp:getdc() // on class Tsection I insert a BMP ( with white backgroud) and on Tsection this part is called oBmp
define bitmap oBmpSymbol filename cBmpFile
PaintTransparent( hDC, oBmpSymbol:hBitmap, 1, 2 ) //your function found on this forum


oBmpSymbol:bRClicked = { | nRow, nCol | LabelInspect_Img( oBmpSymbol, nRow, nCol ) }
oBmpSymbol:SetFocus()
endif

return nil


but it make error alloc zero


thanks
FWH .. BC582.. xharbour
Post Reply