Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » [A4] Does bitmap loading even work anymore?

This thread is locked; no one can reply to it. rss feed Print
[A4] Does bitmap loading even work anymore?
Chris Katko
Member #1,881
January 2002
avatar

input loads.
input2 fails, and started as a PNG converted to a BMP by ImageMagick.

Both identify as bitmaps using the "$ identify [filename]" command from ImageMagick. Both identify as "windows bmp image" in Xubuntu File Manager.

Both load in all other programs.

I can't get Allegro 4 with loadpng to work. I can't get bitmaps to work. This is so bloody frustrating!

[edit] loadpng works now, yay. But what's with them dern bitermappers.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

#00JMP00
Member #14,740
November 2012

Some time ago, I found allegro (4.2) to be somewhat picky about bitmaps.

At the end I only could load bitmaps with the 24-bit tga load routine.
Furthermore it seemed to be dependent on the converter of the upper bitmap.

Maybe it helps.

Thomas Fjellstrom
Member #476
June 2000
avatar

Hm, allegro 4.4 should have support for many BMP formats, not all of them, you can't use any kind of encoding or compression. Stick to 8, 15/16 and 24bpp and it aught to work...

I seem to remember ms updated their bmp format somewhat recently (past 8 years?) And one of the allegro's adding support for that, but i can't remember if 4.4 got it or not. I think it's a new header chunk. Might try saving in an older BMP format if you can.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Elias
Member #358
May 2000

You're probably thinking of https://github.com/liballeg/allegro5/commit/d4212d8b2a79d523aa35d8b2 and it's Allegro 5 only.

[edit:]

So what this means is, Allegro 4 could only load V1 bitmaps, i.e. header size of 12 byte or 40 byte. According to wikipedia these two formats were introduced with Windows 2.0 and Windows NT/3.1, respectively.

Allegro 5 on the other hand can read all headers, even V4 and V5 introduced with win95 and win98 :)

--
"Either help out or stop whining" - Evert

Thomas Fjellstrom
Member #476
June 2000
avatar

Sounds really dumb that A4 never had V4/V5 :o it's new enough. If theres one thing that needs to be (and can be) backported, its this.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Elias
Member #358
May 2000

Except why would anybody ever use .bmp for anything? :P

--
"Either help out or stop whining" - Evert

Thomas Fjellstrom
Member #476
June 2000
avatar

Elias said:

Except why would anybody ever use .bmp for anything? :P

obviously people do ;) but maybe they should use png instead, but hey.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Chris Katko
Member #1,881
January 2002
avatar

I couldn't get png to work at the time, so I tried to fallback on bmp. I spent an hour or two trying to find a mistake in my own code. :o

Regardless, it seems odd to support "bmp" but not 99% of them. At the very least, we need a big glaring "THIS WILL FAIL ON 'NEW' BITMAPS." text disclaimer in the A4 documentation.

Come to think of it, didn't I stumble head first into this same issue last year or two ago?

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Thomas Fjellstrom
Member #476
June 2000
avatar

I think maybe it's time i started a Allegro todo list for myself :o add some motivation to work on it.

There's some simple functions i want to add to a5, and a4 could use a little love now and then.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Elias
Member #358
May 2000

I wonder if anyone except Microsoft supports more than 99% of the .bmp format. Among other things a .bmp can contain JPEG and PNG compressed data - it's one of those Microsoft formats which can basically contain anything.

--
"Either help out or stop whining" - Evert

Chris Katko
Member #1,881
January 2002
avatar

Elias said:

I wonder if anyone except Microsoft supports more than 99% of the .bmp format.

The ones I exported from VLC didn't work in Allegro. :-/

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Elias
Member #358
May 2000

Well, Alelgro 4 only supports 20% I guess, Allegro 5 should be 99% (probably same subset as VLC).

--
"Either help out or stop whining" - Evert

Go to: