I have found the problem - one of the files was reported to be 67Mb, so I am not suprised that there was a problem. However, all the BMPs are now DLLs - should have done it ages ago but lacked the courage! This has reduced the EXE from 1.9Mb to 650K - must easy to distribute upgrades. Many thanks
Iain Johnstone www.mstdrain.co.uk
------------------
Announcement
Collapse
No announcement yet.
PBres
Collapse
X
-
Guest repliedI use RLE (Run Length Encoded) bitmaps in my applications, they can reduce bitmap size by as much as 70%+ in some cases
In one app I had a 45k bitmap shrunk to only 4k! and the image didn't look any different.
------------------
Kev G Peel
KGP Software
Bridgwater, UK.
mailto:[email protected][email protected]</A>
Leave a comment:
-
Originally posted by Iain Johnstone:
The RC file is 97452 and it needs 1.55Mb BMP's. The last compiled PBR was 1394482 in size.
Perhaps, these problems are linked.
BMP-format is too fat. Could be it possible to convert to WMF or TIFF ?
To show WMF is enough simple, using API; tiff - there is special DLL (iSource ?).
[This message has been edited by Semen Matusovski (edited April 20, 2000).]
Leave a comment:
-
Thanks chaps - I have got round the problem temporarily by removing the bitmaps from the RC and loading them in from the main directory as discrete files - not what I really wanted. The DLL route is going to be the one to try!
Thanks for your thoughts
Iain Johnstone
------------------
Leave a comment:
-
lain,
You may find the rsrc utility helpful. It will add a res file to
an exe. No need for pbr's.
www.jcfuller.com/rsrc.zip
James
------------------
[This message has been edited by jcfuller (edited April 20, 2000).]
Leave a comment:
-
Iain;
While I am not sure if there is a limit to the size of a PB Resource file (I think there may be), you can easily get around any limit by breaking up your Resources into multiple Resource files (which is more efficient).
While PB only allows ONE Resource file per EXE or DLL, you can use multiple DLLs as Libraries for Resources.
For example, I could create 10 different Bitmap Libraries using 10 different DLLs, each with its own Resources in it.
Then when a particular Library is needed simply use the API function LoadLibrary to load the Image Library and gets its Instance handle. With the handle you can use any of the API functions:
LoadBitmap
LoadImage
LoadCursor
LoadIcon
to extract the necessary resources from the DLL.
If the Library isn't needed then you can use the API function FreeLibrary to unload the DLL.
By breaking up the Resources into multiple DLLs, you make your program more efficient. Also the main EXE will load faster and you only need to load a Library when the Resources are actually
needed.
------------------
Leave a comment:
-
PBres
Is there a limit to the size of file that PBres can deal with? I am getting the GPF box when I compile a slightly enlarged file that was OK yesterday - taking out the extra bits makes no difference now!!! The RC file is 97452 and it needs 1.55Mb BMP's. The last compiled PBR was 1394482 in size. Any thoughts please
Iain JohnstoneTags: None
Leave a comment: