Image PNG ( solved )
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Image PNG ( solved )
Antonio,
How replace a oBmp1 to a Image png (Transparent)
( i don't convert png to bmp, i realy want use a png image... )
thanks
How replace a oBmp1 to a Image png (Transparent)
( i don't convert png to bmp, i realy want use a png image... )
thanks
Last edited by lailton.webmaster on Thu Oct 01, 2009 6:54 pm, edited 2 times in total.
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Image PNG ( to antonio )
Lailton...
you need use TImage Class
\samples\testimg.prg
\samples\testimg2.prg
you need use TImage Class
\samples\testimg.prg
\samples\testimg2.prg
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: Image PNG ( to antonio )
Daniel,
look this:
http://www.redstarsoft.com.br/sample1.rar
look this that you will see the problem.
You think that fivewin can have comand native to use PNG ? because it use DLL freeimage, i think that it´s time of
fivewin have it native.
thanks so much for your help.
Note: ( Itryed too ON PAINT PalBmpDraw( hDC, 0, 0, oBmp1:hBitmap ) more too no work fine.. )
look this:
http://www.redstarsoft.com.br/sample1.rar
look this that you will see the problem.
You think that fivewin can have comand native to use PNG ? because it use DLL freeimage, i think that it´s time of
fivewin have it native.
thanks so much for your help.
Note: ( Itryed too ON PAINT PalBmpDraw( hDC, 0, 0, oBmp1:hBitmap ) more too no work fine.. )
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Image PNG ( to antonio )
Hello Lailton
Yes, i saw you problem, but is freeimagen fault.
is possible have PNG native, but no for now
you should convert png to alphabitmap
sample:
lailton.webmaster wrote:Daniel,
look this:
look this that you will see the problem.
You think that fivewin can have comand native to use PNG ? because it use DLL freeimage, i think that it´s time of
fivewin have it native.
thanks so much for your help.
Note: ( Itryed too ON PAINT PalBmpDraw( hDC, 0, 0, oBmp1:hBitmap ) more too no work fine.. )
Yes, i saw you problem, but is freeimagen fault.
is possible have PNG native, but no for now
you should convert png to alphabitmap
sample:

Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oWnd, oBmp1
DEFINE WINDOW oWnd STYLE WS_POPUP COLOR CLR_WHITE,CLR_WHITE
oBmp1:=TImage():new(0,0,120,125,,"test.bmp",.t.,ownd)
oBmp1:lTransparent:=.t.
oWnd:Center()
SetTransparent( oWnd )
ACTIVATE WINDOW oWnd ON PAINT PaintTransparent( hDC, oBmp1:hBitmap, 0, 0 )
oBmp1:End()
return nil
//---------------------------------------------------------------------------------------------------//
#define LWA_COLORKEY 1
#define GWL_EXSTYLE -20
#define WS_EX_LAYERED 524288
//---------------------------------------------------------------------------------------------------//
STATIC FUNCTION SETTRANSPARENT( oDlg )
SETWINDOWLONG( oDlg:hWnd, GWL_EXSTYLE, NOR( GETWINDOWLONG( oDlg:hWnd, GWL_EXSTYLE ), WS_EX_LAYERED ) )
SETLAYEREDWINDOWATTRIBUTES( oDlg:hWnd, CLR_WHITE,, LWA_COLORKEY )
RETURN NIL
//---------------------------------------------------------------------------------------------------//
function PaintTransparent( hDC, hBitmap, nRow, nCol )
local hBmpOld := SelectObject( hDC, hBitmap )
local nZeroZeroClr := GetPixel( hDC, 0, 0 )
local nOldClr
SelectObject( hDC, hBmpOld )
nOldClr = SetBkColor( hDC, CLR_WHITE )
TransBmp( hBitmap, nBmpWidth( hBitmap ), nBmpHeight( hBitmap ), nZeroZeroClr, hDC, nRow, nCol, nBmpWidth( hBitmap ), nBmpHeight( hBitmap ) )
SetBkColor( hDC, nOldClr )
return nil
//---------------------------------------------------------------------------------------------------//
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: Image PNG ( to antonio )
Daniel,
The problem using as bmp is:
Size of file is but..
png file have 8,106 Bytes
bmp file have 60,056 Bytes
Quality
It´s very good !

It´s +/- ( but to bad ... )

How i say before, png is execellent, all language have suport this, think that it´s time
of fivewin too have native suport and remove freeimage.dll
( or use only to bmp file.. )
other ASK
that program you use to convert png to bmp ?
thanks.
The problem using as bmp is:
Size of file is but..
png file have 8,106 Bytes
bmp file have 60,056 Bytes
Quality
It´s very good !

It´s +/- ( but to bad ... )

How i say before, png is execellent, all language have suport this, think that it´s time
of fivewin too have native suport and remove freeimage.dll

other ASK
that program you use to convert png to bmp ?
thanks.
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Image PNG ( to antonio )
Lailton...
Photoshop
Photoshop
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Re: Image PNG ( to antonio )
Lailton:
You can also use PixelFormer it's a very good program and it's !! free !!.
Un abrazo.
lailton.webmaster wrote:that program you use to convert png to bmp ?
You can also use PixelFormer it's a very good program and it's !! free !!.
Un abrazo.
manuelmercado at prodigy dot net dot mx
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: Image PNG ( to antonio )
mMercado,
Really Very good !
i will use this solucion at a day i can use direct by fivewin [:D]
Thanks for yours Help Daniel and mMercado.
Really Very good !
i will use this solucion at a day i can use direct by fivewin [:D]
Thanks for yours Help Daniel and mMercado.
Re: Image PNG ( solved )
You can search for < Pixelformer > in the Forum.
I have written some Instructions about this Application, how to use it.
As well You can find the Download-Link.
Best Regards
Uwe
I have written some Instructions about this Application, how to use it.
As well You can find the Download-Link.
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm