Knights Forum

General Category => Knights Discussion => Topic started by: d.healey on September 06, 2017, 09:25:53 PM

Title: BMP Unsupported header size
Post by: d.healey 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?
Title: Re: BMP Unsupported header size
Post by: Stephen 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.)
Title: Re: BMP Unsupported header size
Post by: d.healey on September 07, 2017, 09:49:35 PM
Thanks, I shall have a play around with
Title: Re: BMP Unsupported header size
Post by: Stephen on September 14, 2017, 06:25:00 PM
Did you get anywhere with this?
Title: Re: BMP Unsupported header size
Post by: d.healey 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 :)
Title: Re: BMP Unsupported header size
Post by: K9 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.