News:

SMF - Just Installed!

Main Menu

BMP Unsupported header size

Started by d.healey, September 06, 2017, 09:25:53 PM

Previous topic - Next topic

d.healey

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

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

Thanks, I shall have a play around with

Stephen


d.healey

Not yet, I haven't had time to have another look at it, I did make a wand of invisibility though :)

K9

Wand of invisibility sounds interesting... if it works on creatures, I can only imagine the chaos and fun that would create.