Max dimension of a BMP files in a RES file

Max dimension of a BMP files in a RES file

Postby MarcoBoschi » Tue Apr 16, 2013 12:29 pm

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.
User avatar
MarcoBoschi
 
Posts: 1015
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

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

Postby Rick Lipkin » Tue Apr 16, 2013 12:56 pm

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
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

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

Postby MarcoBoschi » Tue Apr 16, 2013 1:34 pm

Bravo Rick!
Problem solved!
King regards
Marco
User avatar
MarcoBoschi
 
Posts: 1015
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

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

Postby nageswaragunupudi » Tue Apr 16, 2013 2:26 pm

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
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby Rick Lipkin » Tue Apr 16, 2013 3:09 pm

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=

 
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

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

Postby nageswaragunupudi » Tue Apr 16, 2013 4:02 pm

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby Rick Lipkin » Tue Apr 16, 2013 4:15 pm

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
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

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

Postby sambomb » Tue Apr 16, 2013 8:48 pm

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.
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

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

Postby Rick Lipkin » Wed Apr 17, 2013 1:16 pm

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
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

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

Postby sambomb » Wed Apr 17, 2013 2:38 pm

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.
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

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

Postby Rick Lipkin » Wed Apr 17, 2013 2:52 pm

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
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

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

Postby sambomb » Wed Apr 17, 2013 3:01 pm

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...
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 90 guests