Page 1 of 3

Uwe we need your help :-)

PostPosted: Tue Dec 30, 2014 5:35 pm
by Antonio Linares
We need our painting Master help here :-)

viewtopic.php?f=6&t=29891&start=0

Re: Uwe we need your help :-)

PostPosted: Tue Dec 30, 2014 7:02 pm
by ukoenig
Antonio,
as far I understand ( spanish ), the image is stored inside a resource ?
The problem :
You need a alphachannel-Image ( 32bbp ), to get clean borders.
It means, the used Resource-editor MUST support this format,
otherwise the quality is very bad.
I hope I understand the problem ?
What resource-editor You are using ?

Only a alphachannel-Image ( 32bbp ) shows a clean border.
A long time ago, I bought a resource editor ( never updated ), that supports this format.
I have to check the update-infos what is new.

Image

Tested 30 days trial ( 32bbp is supported ) :

32bbpimage loaded :

Image

The generated RC-file :

Image

best regards
Uwe :?:

Re: Uwe we need your help :-)

PostPosted: Tue Dec 30, 2014 9:00 pm
by Rick Lipkin
Uwe

If you use 32 bit bitmaps they will not compile into your .exe via .rc .. at least not with Borland. The only way I get alpha channel bitmaps to burn into my .exe is to save as 24 bit in my .rc or reference the 32 bit bitmap as a ( external ) file.

Rick Lipkin

Re: Uwe we need your help :-)

PostPosted: Tue Dec 30, 2014 10:44 pm
by D.Fernandez
Pelles C can do it.

I save bmp alpha channel with Pixelformer.
png to bmp alpha channel. and include it in .res with Pelles C.
My be could help you.

Sorry for my English.

Best regards.
Saludos.
Ruben Dario Fernandez.

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 11:24 am
by Enrico Maria Giordano
Rick,

Rick Lipkin wrote:If you use 32 bit bitmaps they will not compile into your .exe via .rc .. at least not with Borland. The only way I get alpha channel bitmaps to burn into my .exe is to save as 24 bit in my .rc or reference the 32 bit bitmap as a ( external ) file.


Can you send me a 32 bit bitmap to test it here with Borland, please?

EMG

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 1:04 pm
by Antonio Linares
Dear Uwe,

Please review this:

viewtopic.php?p=169910#p169910

thanks! :-)

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 2:54 pm
by Rick Lipkin
Enrico

I just sent you a 24 bit and a 32 bit alpha chanel bitmaps. Let me know if you have the same results. For me the Borland rc compiler ( both 5.5 and 5.82 ) will not compile the 32 bit but will the 24 bit will. Here is my modified batch file to create the .res

Code: Select all  Expand view

@Echo Off
rem RC file to 32 bits resources DLL
rem syntax: rc2dll32.bat Your_rc_file  !!! without the .RC extension

DEL SaW32.DLL
DEL SaW32.RC
DEL SaW32.RES

COPY *.RC SaW32.RC

C:\BORLAND\BCC582\BIN\brc32 -r %1.rc


del *.iL?
del *.map
del *.obj
del *.~rc
del *.rws
:del *.res
del *.tds
echo done!

 


Rick Lipkin

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 3:34 pm
by nageswaragunupudi
test.prg
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oDlg, oFont, oImage
   local cName := PadR( "FiveWin", 50 )

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-16 BOLD
   DEFINE DIALOG oDlg SIZE 400,350 PIXEL FONT oFont STYLE  WS_POPUP

   @ 20,68 IMAGE oImage FILE "c:\fwh\bitmaps\AlphaBmp\trash.bmp" SIZE 64,64 PIXEL OF oDlg NOBORDER
   @ 100,00 SAY "TRANSPARENT DIALOG" SIZE 200,12 PIXEL OF oDlg COLOR CLR_BLACK,CLR_WHITE CENTERED
   @ 112,00 SAY "Enter Your Name:" SIZE 200,12 PIXEL OF oDlg COLOR CLR_BLACK,CLR_WHITE CENTERED
   @ 130,10 GET cName SIZE 180,16 PIXEL OF oDlg
   @ 150,60 BUTTON "Close" SIZE 80,20 PIXEL OF oDlg ACTION oDlg:End()

   oDlg:nSeeThroClr  := oDlg:nClrPane

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 


Image

The background image is my desktop.

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 4:01 pm
by Enrico Maria Giordano
Rick,

Rick Lipkin wrote:I just sent you a 24 bit and a 32 bit alpha chanel bitmaps. Let me know if you have the same results.


Yes. It looks like brc32 is not compatible with 32 bit bitmaps. And unfortunately it hasn't been updated even in the latest BCC 6.90 (it's the same version 5.40). :-(

EMG

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 4:03 pm
by nageswaragunupudi
Enrico Maria Giordano wrote:Rick,

Rick Lipkin wrote:I just sent you a 24 bit and a 32 bit alpha chanel bitmaps. Let me know if you have the same results.


Yes. It looks like brc32 is not compatible with 32 bit bitmaps. And unfortunately it hasn't been updated even in the latest BCC 6.90 (it's the same version 5.40). :-(

EMG

Yes.
I am using Pelles to save as res files and linking them

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 4:22 pm
by Enrico Maria Giordano
Nages,

nageswaragunupudi wrote:I am using Pelles to save as res files and linking them


We would need of a command line resource compiler...

EMG

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 4:25 pm
by mastintin
use rc.exe from microsoft ... 2 files -+ 500kb. ...

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 4:28 pm
by Enrico Maria Giordano
mastintin wrote:use rc.exe from microsoft ... 2 files -+ 500kb. ...


Can you send me that, please? :-)

EMG

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 5:07 pm
by mastintin
Yes. Check email. :)

Re: Uwe we need your help :-)

PostPosted: Wed Dec 31, 2014 5:58 pm
by Enrico Maria Giordano
Thank you. Unfortunately it doesn't support inline data... :-(

EMG