Author Topic: BMP Unsupported header size  (Read 2086 times)

d.healey

  • Jr. Member
  • **
  • Posts: 18
BMP Unsupported header size
« on: September 06, 2017, 09:25:53 PM »
I'm having a go at creating a wand mod. I've edited the graphics in GIMP and exported as BMP but when I run knights it says unsupported header size. Any ideas?

Stephen

  • Administrator
  • Hero Member
  • *****
  • Posts: 259
Re: BMP Unsupported header size
« Reply #1 on: September 07, 2017, 08:43:02 PM »
I wrote my own BMP loading code (some years ago now...) and it doesn't support all possible BMP formats, only the most common ones (or at least, what was common in 2008 :) ). It seems that GIMP is saving in a format that Knights doesn't support.

There are 3 answers:

1) Extend the Knights image loading code to handle other types of BMP file (see load_bmp.cpp)

2) Use an image loading library (SDL_image maybe?) instead of my hand coded image loader (probably a good idea to be honest, but will require some work)

3) See if we can persuade GIMP to save in a form that Knights supports. I would try the "Do not write colour space information" option in GIMP and see if that does it. (You have to go to File -> Export, save in bmp format, then open up Compatibility Options.)

d.healey

  • Jr. Member
  • **
  • Posts: 18
Re: BMP Unsupported header size
« Reply #2 on: September 07, 2017, 09:49:35 PM »
Thanks, I shall have a play around with

Stephen

  • Administrator
  • Hero Member
  • *****
  • Posts: 259
Re: BMP Unsupported header size
« Reply #3 on: September 14, 2017, 06:25:00 PM »
Did you get anywhere with this?

d.healey

  • Jr. Member
  • **
  • Posts: 18
Re: BMP Unsupported header size
« Reply #4 on: September 15, 2017, 04:30:29 PM »
Not yet, I haven't had time to have another look at it, I did make a wand of invisibility though :)

K9

  • Hero Member
  • *****
  • Posts: 111
Re: BMP Unsupported header size
« Reply #5 on: May 06, 2018, 09:22:49 PM »
Wand of invisibility sounds interesting... if it works on creatures, I can only imagine the chaos and fun that would create.