Page 1 of 1

png files on bmp

Posted: Sun Jan 17, 2010 4:40 pm
by MdaSolution
I must insert png transparent on a big bmp

can have a sample please

Re: png files on bmp

Posted: Sun Jan 17, 2010 4:51 pm
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:

Re: png files on bmp

Posted: Sun Jan 17, 2010 5:57 pm
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