I've done a little math: you've loaded a 240x320 24bit BMP; The same amount 
of space would be required to hold 300 16x16 images or 133 24x24 images.

I think you're kind of miss-using MS's TImageList if you add large (240x320 
is large) images to it. This control is designed to efficiently hold SMALL 
images (16x16 / 24x24 / 32x32) - the kind of images one usually uses for 
menus and toolbar buttons. It's deffinitivley NOT a repository for 
splash-screen-sized images!

Again, given it's purpuse, it's only natural it only holds BMP's. If it 
would hold JPG's it would probably need to turn them into BMP at run time 
and cache them any way. Also I don't think a 16x16 256 colors bitmap would 
compress very well when turned into a JPG.

One last thing: While the increase in your exe size is difficult to 
understand, the increased COMPILE time has nothing to do with TImageList and 
has allmost everything to do with Borland's DFM files! You'll have the SAME 
problem trying to store 5,6 Mb of ANYTHING into a DFM! (Guess DFM was not 
designed as a file repository...)

Eric Daniels wrote:
> Wow Microsoft's image list is really crap....
>
> 25 bmp's all sized at 226k width 240 x height 320 made my exe file
> size 10 megs along with a 4 minute compile time clearly will not
> work....
>
> I've saved my bmp's to jpg format and compiled them into a resource
> file with resource id 1 - 25 and wrote a procedure to load them from
> my exe file and final outcome is an exe file size of only 800 k...
>
> Simple Test Of MS's Control...
>
> I placed an imagelist component on my form changed imagelist width to
> 240 and height to 320 and loaded one bmp file size 226k and compiled
> without using the imagelist at all in my exe and the file size grew
> from 525k to an astounding 1.7 megs by just placing one little bmp in
> that imagelist component of which was never used in my exe file....
>
> Overall TJpgImgList will not use Microsoft's Image List Control
> because of several reasons,  The birth of a better imagelist
> component might be on the horizon :)_
>
> I haven't quite figured out the best methods for storing the images
> to be included in the exe file...
>
> The reason for this component was for a tetris game I wrote where
> each level had a new background image upon completion of each level...
>
> I used my quick and dirty method of building a res file with the
> jpg's and compiling into my exe and loading the images with a custom
> written procedure...
>
> Finished File Size 823k and the game will save out the jpg's after
> there displayed...  A Client request
>
> Sorry for the long post but I wish I knew this information before
> taking on this project...TJpgImgList is Still Under Construction....
>
> Kind Regards...
>
> Eric Daniels
>
>
>
>
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi 

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to