Page 1 of 1

Max dimension of a BMP files in a RES file

PostPosted: Tue Apr 16, 2013 12:29 pm
by MarcoBoschi
Hi,
I have a a BMP files of 1.579.354 bytes
I've tried to load it into a RES file
When I link I have this error

any ideas?
Marco

c:\myprogram>\bcc55\bin\ilink32 c0w32 @program.lnk @\fwh\fwh.rsp , , program.res
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Fatal: Access violation. Link terminated.

when I launch the program I have this error ( I live in Italy)
La versione di c:\bin\kit\PROGRAM.EXE è incompatibile con la versione di Windows in esecuzione. Veri
ficare nelle informazioni di sistema se è necessaria una versione x86 (a 32 bit) o x64 (a 64 bit) de
l programma, quindi contattare il distributore del software.

Re: Max dimension of a BMP files in a RES file

PostPosted: Tue Apr 16, 2013 12:56 pm
by Rick Lipkin
Marco

It is not the size of the file but the bit resolution. From my experience you can not compile a .bmp into a .res file any greater than 24 bit for our applications.

If you like the better 32 bit resolution you have to reference the .bmp as an external File.

There are many free picture editors like PixelFormer and Gimp that can convert your images from one form to another and save them in varying bit resolutions.

Here is a screen shot from Gimp showing the various options to save a file in specific bit resolutions.

Hope this helps.

Rick Lipkin

Image

Re: Max dimension of a BMP files in a RES file

PostPosted: Tue Apr 16, 2013 1:34 pm
by MarcoBoschi
Bravo Rick!
Problem solved!
King regards
Marco

Re: Max dimension of a BMP files in a RES file

PostPosted: Tue Apr 16, 2013 2:26 pm
by nageswaragunupudi
It is not the size of the file but the bit resolution. From my experience you can not compile a .bmp into a .res file any greater than 24 bit for our applications.

This is not correct.
I compile rc files containing 32 bit bmps and also Alpha bmps with Pelles C into res files and then link res files into my exe with xMate using borland

Re: Max dimension of a BMP files in a RES file

PostPosted: Tue Apr 16, 2013 3:09 pm
by Rick Lipkin
Rao

Would you mind sharing your xMate environment .. I would like to try ( just ) the Pelles C resource compiler myself.

I have been using Brc32 for years and never changed, however it does have the 24 bit restriction compiling .res.

Rick Lipkin

Code: Select all  Expand view


[Environment]
Description 1=Updated for FWH 1203
Description 2=
Description 3=
PRG Compiler ver=xHarbour
C compiler ver=Bcc582
Subsystem=FWH1203
Author=Richard Lipkin
Last update=06/09/2012

[Advanced]
Command types=1,1,1,1,1,1,1,1,1

[Harbour]
HB_INSTALL=C:\XHARBOUR
HB_COMMAND=%HB_BIN_INSTALL%\Harbour.Exe %PRG% /m /n /gc0 /w0 /es2 /a /i%HB_INC_INSTALL% /d__EXPORT__
Option prefix=/

[C]
C_INSTALL=C:\Borland\bcc582
C_COMP_COMMAND=%C_BIN_INSTALL%\Bcc32.Exe -M -c -v %CRLF%-DHB_OS_WIN_32 %CRLF%-I%C_INC_INSTALL%;%HB_INC_INSTALL%  -n%HOME%\Obj %C%
C_LIB_COMMAND=%C_BIN_INSTALL%\TLib.Exe %LIB% /P512 @%RSP% , %LST%
C_LINK_COMMAND=%C_BIN_INSTALL%\iLink32.Exe -Gn -aa -Tpe -s -v @%LNK%
C_RC_COMMAND=%C_BIN_INSTALL%\Brc32.Exe -r  -fo%RES%  %RC%
C_DLL_COMMAND=
Option prefix=-

[User]
POSTEXE_COMMAND=
POSTLIB_COMMAND=
POSTDLL_COMMAND=

 

Re: Max dimension of a BMP files in a RES file

PostPosted: Tue Apr 16, 2013 4:02 pm
by nageswaragunupudi
Mr Rick

Create the rc file with Pelles C. (eg. test.rc)
Save as res file. (eg test.res)

Add the res file (test.res) into your xmate instead of rc file. (test.rc)
Thats all.

Re: Max dimension of a BMP files in a RES file

PostPosted: Tue Apr 16, 2013 4:15 pm
by Rick Lipkin
Rao

I will download and see what switches the executable has .. typically what I do is create all my individual forms in .rc ( including Icons.rc for my icons, etc ) .. then I have modified rc2dll32 this way ..

Code: Select all  Expand view

COPY *.RC SaW32.RC

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

 


Thanks
Rick

Re: Max dimension of a BMP files in a RES file

PostPosted: Tue Apr 16, 2013 8:48 pm
by sambomb
I heard somewhere that the max size for a RES file is 1 MB, maybe when you reduced the image Bits you also reduced the final size of the RES File.

Re: Max dimension of a BMP files in a RES file

PostPosted: Wed Apr 17, 2013 1:16 pm
by Rick Lipkin
Samir

I am curious to try Rao's solution .. I have tried ResEdit using the /convert switch to compile .rc to .res without any success linking that .res into my .exe :( ... because I much prefer the look and resolution of a 32 bit alpha bitmap over 24 bit.

As far as any .res file size limit .. my .res file on my current project is 1.3 mg and I am no where near done yet.

Rick Lipkin

ps . Rao, take a look at my previously posted xMate environment and tell me how you solved the .res link into your .exe

Re: Max dimension of a BMP files in a RES file

PostPosted: Wed Apr 17, 2013 2:38 pm
by sambomb
I use Pelles C to edit the .RES file...
I have some RES file above 1 MB, 2.73 MB is the larger but that RES contains a lot of Bitmap files instead of one larger file.

I have 32 bit BMP in the RES, I don't use Alpha because in older versions of FWH they didn't work as expected and is too much effort to migrate everything to Alpha now.

Re: Max dimension of a BMP files in a RES file

PostPosted: Wed Apr 17, 2013 2:52 pm
by Rick Lipkin
Samir

Perhaps my failure when I compiled my .res with 32 bit files it was because they were alpha blend ?? The Borland command below is how I compile my .rc to .res

Code: Select all  Expand view

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


Since all my .bmp are alpha blend .. that may be the 24 bit restriction ?

Rick Lipkin

Re: Max dimension of a BMP files in a RES file

PostPosted: Wed Apr 17, 2013 3:01 pm
by sambomb
http://www.smorgasbordet.com/pellesc/download.htm

Try use PellesC to manage the RC ( you can open the RC and save as RES ), and after that you junt link together with the other files.

Try without Alpha, I use Axialis Icon Workshop to edit my bitmaps...