Author Topic: [SOLVED] SPASM picky with BMP formats  (Read 4347 times)

0 Members and 1 Guest are viewing this topic.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
[SOLVED] SPASM picky with BMP formats
« on: April 21, 2014, 02:40:09 pm »
OK this problem is solved. SPASM wants BMP3 images (maybe older will work but I didn't try) and has trouble with BMP4. In ImageMagick you can force the format like so : convert input.foo BMP3:output.bmp

Spoiler For Original post:
So I'm trying to use SPASM to convert my bitmaps for Illusiat (with #include).
Problem is it's being picky with the format.


I have attached title.bmp which is accepted no problem. I converted it with a drawing program from KDE but it's a PITA to deal with.
The other file, title1.bmp is refused for some reason. As you may notice, it's bigger despite being 1bpp B/W like the other one. :/ I converted it with convert -colors 2 -depth 1 title.bmp title1.bmp (ImageMagick). I'd rather use that kind of tool because it's scriptable. But I have no idea how it may be different.


Any ideas ?


Also, once again I don't know if it belongs in the calculator ASM section since it's a PC thing but it's related.


Edit : Weird. Seems like the forum doesn't like title1 either, it is a proper image file that opens correctly in Eye of MATE. ???
Spoiler For Spoiler:
« Last Edit: April 22, 2014, 03:40:34 am by Streetwalrus »

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: SPASM picky with BMP formats
« Reply #1 on: April 21, 2014, 03:29:47 pm »
If I view title1.bmp in opera it's red/green instead of black/white. Maybe that's the issue?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: SPASM picky with BMP formats
« Reply #2 on: April 21, 2014, 05:56:37 pm »
No problem for me in Opera 12.16 and 20, but I'm on Windows.


Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: SPASM picky with BMP formats
« Reply #3 on: April 21, 2014, 06:34:57 pm »
If I view title1.bmp in opera it's red/green instead of black/white. Maybe that's the issue?
Indeed it does that on my phone too. *.* I'll look into ImageMagick more after I sleep. :P

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: SPASM picky with BMP formats
« Reply #4 on: April 21, 2014, 07:04:51 pm »
It looks like title.bmp uses a long-standing and universally supported bitmap header, whereas title1.bmp uses the newest bitmap header format which is larger due to allowing for lots of extra stuff and not as widely supported. Try specifying for ImageMagick to use the BMP2 (or perhaps BMP3) format.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: SPASM picky with BMP formats
« Reply #5 on: April 21, 2014, 07:10:26 pm »
Okay I will give this a shot. If that's the case, GIMP might actually do the same since I couldn't get its BMPs to work either. What's weird though is why is it red and green on Vogtinator's PC and my phone but proper b/w on my PC and DJ's ? ??? Maybe the format needs a palette to be specified which ImageMagick didn't do or something.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: SPASM picky with BMP formats
« Reply #6 on: April 22, 2014, 03:37:26 am »
Well it worked ! :D Problem solved.