When I'm using the image encoders and decoders a lot of their unused error messages are compiled into my executable, like "LZWDecode: Bogus encoding, loop in the code table; scanline %d" or "Application uses deprecated png_write_init() and should be recompiled."
Could you please edit the plugins so that these texts aren't in the final executable anymore?
ImagePlugins: Remove unnecessary error texts in compiled exe
ImagePlugins: Remove unnecessary error texts in compiled exe
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
- Michael Vogel
- Addict
- Posts: 2797
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
Re: ImagePlugins: Remove unnecessary error texts in compiled
Haven't thought that such "waste" would be in the libs, but I would also ask for reducing as much overhead as possible. The new 4.40 release brought (between 20 and 30K) larger exe files, so the size of some smaller tools has been even doubled
-- so loosing some weight would be nice
Michael


Michael
Re: ImagePlugins: Remove unnecessary error texts in compiled
Yes...
When you are compiling the following code, nearly a third of the resulting executable will be of those unused messages:
So please PureBasic be yourself again.
When you are compiling the following code, nearly a third of the resulting executable will be of those unused messages:
Code: Select all
UseJPEGImageDecoder()
UseJPEGImageEncoder()
UsePNGImageDecoder()
UsePNGImageEncoder()
UseJPEG2000ImageDecoder()
UseJPEG2000ImageEncoder()
UseTGAImageDecoder()
UseTIFFImageDecoder()

www.purebasic.com/faq.php wrote: Is PureBasic really small and fast ?
Yes. All has been optimized to give maximum speed and compactness to the programs created with PureBasic. The execution speed match almost any professional compiler like Visual C++ and the executable size is smaller, without the need for any runtime (small programmes are typically between 5 kb and 10 kb).
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
-
- Enthusiast
- Posts: 469
- Joined: Sun Mar 16, 2008 9:18 am
Re: ImagePlugins: Remove unnecessary error texts in compiled
From what I can see, those messages are part of the decoders that PureBasic uses, and therefore can't be removed. PureBasic itself doesn't decode them, the included decoders do it. Removing the messages (if possible) would probably be a violation of the licenses used by PureBasic.
But there's some code on the forums here that lets you load GIFs, PNGs, JPGs, etc using Windows itself, rather than needing all those included image decoders, and your executable size drops dramatically because they're not used. For example, I've been loading JPGs in my apps without needing UseJPEGImageDecoder() for years. I think netmaestro posted the tip. Do a search.
But there's some code on the forums here that lets you load GIFs, PNGs, JPGs, etc using Windows itself, rather than needing all those included image decoders, and your executable size drops dramatically because they're not used. For example, I've been loading JPGs in my apps without needing UseJPEGImageDecoder() for years. I think netmaestro posted the tip. Do a search.

Re: ImagePlugins: Remove unnecessary error texts in compiled
Sure.UserOfPure wrote:From what I can see, those messages are part of the decoders that PureBasic uses, and therefore can't be removed. PureBasic itself doesn't decode them, the included decoders do it. Removing the messages (if possible) would probably be a violation of the licenses used by PureBasic.
But don't these libs usually have a compiling flag like "NoErrorMessages" or something similar?
I mean as long as their copyright messages stay intact everything should be fine, right?
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!