FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour png files on bmp
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
png files on bmp
Posted: Sun Jan 17, 2010 04:40 PM

I must insert png transparent on a big bmp

can have a sample please

FWH .. BC582.. xharbour
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: png files on bmp
Posted: Sun Jan 17, 2010 04:51 PM
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 )



Best 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.
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: png files on bmp
Posted: Sun Jan 17, 2010 05:57 PM
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: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

Continue the discussion