Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » LBM files? drop support ?

This thread is locked; no one can reply to it. rss feed Print
 1   2 
LBM files? drop support ?
A J
Member #3,025
December 2002
avatar

LBM support, does anyone actually use this ?
when are some good file formats going to be supported ?

___________________________
The more you talk, the more AJ is right. - ML

Richard Phipps
Member #1,632
November 2001
avatar

Jpeg = license issues which clash with Allegro's.
Png = license issues which clash with Allegro's.
GIF = license expired (or soon to expire). May be able to be added.

Kitty Cat
Member #2,815
October 2002
avatar

RP: not quite.. more like:

Jpeg = patent issues. would also increase code size.
Png = dependancy issues. any ideas for work-arounds?
GIF = patent issues. PNG is better anyway.

Though I do have an idea for a PNG work around. Allegro could ship with both the latest zlib and libpng sources. For Unix, a configure check would enable/disable building zlib and libpng libraries. For Windows, it would compile them and would be optionally installed (in case the user already has them). Would be nice if there was a command-line way in Windows to check if one DLL/lib is newer than another, though. That way the make install target could check and install as needed. It would all be completely transparent to the user.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Evert
Member #794
November 2000
avatar

I don't think anyone uses LBM's, not anymore certainly (I think I only had a need to be able to read them once, a long time ago). As for removing it, the policy is that it doesn't really hurt anyone that it's still there, so just leave it.

As for supporting other formats, most notable PNG and JPEG, there are already good addons that do this. For licensing reasons, it's difficult to include these in Allegro. As for gif files, there are good addons for loading these too, and I think the general consensus is that adding PNG support by default would be more useful.
I think there was some discussion about this topic on AD a few weeks ago, you may want to look up the archives.

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

For licensing reasons, it's difficult to include these in Allegro.

zlib and libpng doesn't really have any licensing issues: http://awiki.tomasu.com/bin/view/Main/LicenceZlib. The licence is practically Allegro's. Regardless, all you'd have to do is package libpng and zlib, unaltered, with Allegro, and Allegro can use them as-is without any issues. They're not (L)GPL so linking with them, explicitly or not, incurrs nothing on Allegro.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

X-G
Member #856
December 2000
avatar

I second the motion suggested by Kitty Cat to include PNG support in Allegro's core, as well as his suggested method for doing so. It's one I've suggested myself on occasion.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Oscar Giner
Member #2,207
April 2002
avatar

I third it. Currently PNG is the only image format I use: great lossless compression, support for palette or true color, alpha channel :)

Quote:

For Windows, it would compile them and would be optionally installed (in case the user already has them). Would be nice if there was a command-line way in Windows to check if one DLL/lib is newer than another, though.

In Windows I would static link them, but that's just my opinion (I don't like to see a lot of dll's in my game's folder) :)

gnolam
Member #2,030
March 2002
avatar

And I, err, fourth it :)
The zlib license is as KC says pretty Allegro-compatible, and the ability to use PNGs natively with Allegro/AllegroGL would be a godsend...
The only thing is that we'll probably have to devote 50% of all Allegro.cc posts to explaining how to make and install zlib and libpng :P
(death to libraries with no "make install" or installation instructions!)

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

spellcaster
Member #1,493
September 2001
avatar

Couldn't agree more... that means I five it. :)

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

The only thing is that we'll probably have to devote 50% of all Allegro.cc posts to explaining how to make and install zlib and libpng :P

Allegro's makefile could handle that, too.. it can invoke the proper zlib and libpng makefiles when needed.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Steve Terry
Member #1,989
March 2002
avatar

DO IT!!!! Oh is it possible to not detect file type by extension but rather by header, this is the Linux way anyway, windows would just use the extension, but it would certianly be more secure/correct.

___________________________________
[ Facebook ]
Microsoft is not the Borg collective. The Borg collective has got proper networking. - planetspace.de
Bill Gates is in fact Shawn Hargreaves' ßî+çh. - Gideon Weems

gnolam
Member #2,030
March 2002
avatar

... why?
Try as I might I can't come up with a good reason (loading from memory would be the only reason, but we can't do that anyway). It'd only break compatibility and encourage people to do stupid shit like renaming their TGAs into PNGs or whatnot. :P
As for secure: if the file isn't what it advertises, just return NULL.

[EDIT]
Heh, that sounds like a slogan - Nancy Reagan says: "Just Return NULL!" ;D

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Steve Terry
Member #1,989
March 2002
avatar

Meh just a suggestion :P

___________________________________
[ Facebook ]
Microsoft is not the Borg collective. The Borg collective has got proper networking. - planetspace.de
Bill Gates is in fact Shawn Hargreaves' ßî+çh. - Gideon Weems

Gideon Weems
Member #3,925
October 2003

LBM == Lossless Bitmap?

If Allegro had PNG support, I would certainly use it. Though, things are fine to me the way they are. However, the #1 advantage to adding this functionality would be in making Allegro more attractive to new users. PNG support looks good on paper.

Of course, it also makes a perfect add-on, but sometimes it seems everything makes a perfect add-on...

X-G
Member #856
December 2000
avatar

And this is such a perfect add-on I say it deserves to be in the core. It makes more sense than having LBM support, for one thing. We already have TGA - why not also use PNG that's superior in more or less every way?

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Gideon Weems
Member #3,925
October 2003

checks manual Oh, LBM is that fourth image format! Hahaha. I guess that goes to show... As for dropping support, though, that wouldn't be good. It's nice to know that it's there and can be used.

Issues like this make AllegroPro's tier system appealing. There would be no debate of add-on vs. core.

Evert
Member #794
November 2000
avatar

Quote:

And this is such a perfect add-on I say it deserves to be in the core. It makes more sense than having LBM support, for one thing.

Aye, I don't think anyone will argue against that point. Having PNG support in the library by default would be extremely useful.

Personally, I don't like the idea of including zlib and libpng in the Allegro source tree. Think about it: you'd have to make sure they are kept up to dat, you need to make sure they build correctly on all supported systems and compilers. What to do about people who already have the libraries? Do you force them to download it? What if you make it an optional download (provided there's an easy way to do something functionally similar to `./configure' in Windows) and someone compiles a program that assumes Allegro was compiled with PNG support and someone tries to run the program with a DLL that was build without it (ok, so the official DLL should include it, but people do silly things)?

What would be ideal, in my opinion, is the already proposed idea of a `standard plugin': you download the allegro source and whatever plugins you want for it, and it all gets compiled and installed by one single make instuction. You'd still have to #include <loadpng.h> and call register_png_file_type() manually (which isn't nescessarily a bad thing), but it'd get build and installed by default.
The problem with this standard plugin system is that someone actually has to write it and integrate it with the build system.

Radagar
Member #2,768
September 2002
avatar

LBM? I thought that was like a Left-Button on your Mouse?

------------
Radagar - So your vote is for A.D.H.D.?
Chris Katko - Well, that was uninten--ooh kitty!

X-G
Member #856
December 2000
avatar

Quote:

Think about it: you'd have to make sure they are kept up to dat, you need to make sure they build correctly on all supported systems and compilers. What to do about people who already have the libraries? Do you force them to download it?

Kitty Cat's idea fixes this part. You ship with Allegro whatever version is up-to-date at point of release; then you add a configure option that lets the user use another version of libz/libpng instead if he chooses to.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Peter Wang
Member #23
April 2000

Not to derail this thread, but Angelo and myself have a secret plan to move LBM and FLIC support out of the core (amongst other things). Dunno when it would happen though, but after 4.2.

PNG support: I guess it's inevitable, and Chris' method would be okay (sort of like the module loading we do on unix, although I don't like the idea of format support that may or may not be present at runtime). We should not have to ship zlib/libpng sources with Allegro though.

EDIT: Sorry, I was thinking of Chris' other idea which involved loading zlib/libpng libraries at runtime.

A J
Member #3,025
December 2002
avatar

im not sure if i was keeping score correctly, but i 6th the motion to add PNG support to the core, and i have mixed feelings about dropping LBM support.. its just bloat that we can do without.
but if its only a little bloat, then thats OK.

___________________________
The more you talk, the more AJ is right. - ML

Kitty Cat
Member #2,815
October 2002
avatar

my konsole said:

$ ll src/lbm.c
rw-r--r- 1 kitty users 8.0K May 18 2003 src/lbm.c

So, it's approximately 8,192 bytes for LBM aupport.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Gnatinator
Member #2,330
May 2002
avatar

[editored]
BTW, wtf is an LBM?

..

I would also really like to see some better PNG support for Allegro. LoadPNG is old and broken.

Peter Wang
Member #23
April 2000

lbm.c is only 297 lines of code, containing one largish but simple function. Insignificant as far as bloat is concerned.

Gnatinator
Member #2,330
May 2002
avatar

Ah there is peter now! :D

Maybe there can be some LoadPNG code merging/updating going on?

 1   2 


Go to: