NKF, on Jan 29 2005, 04:28 PM, said:
I've a question of my own:
I thought I'd give pckview a go, as I've had a little idea that's been buzzing around my head so badly that I had to at least get it started. Only one small part of it involves changing a few graphics. I thought I'd get this part out of the way before moving on to the easier bits.
I was going to replace a few pictures in bigobs.pck, so I extracted an image from it, edited it, made absolutely sure that the UFO battlescape palette was loaded after I'd done the editing, then saved it back as a bmp. I then checked that the palette was saved correctly, and it was.
Now, every time I try to import it back into bigobs.pck I get an exception error. I thought it was probably the RLE compression or maybe I'd accidentally saved it as an OS2 bitmap, So I decided to fiddle around with the options for saving the .bmp file. And when it does load, the image is torn. Or rather the image is slanted. But when I reload any of the bitmaps saved by pckview, they load back into the game just fine.
I've tried saving and resaving the new file in a variety of editors, from the Gimp, Irfanview and Photoshop elements 3.0 to no avail.
So is there any particular format for plain bitmap files that must be used?
If you are editing the large bigobs.pck file that contains more than one image, the program doesnt save it exactly how the game wants for some reason.
If you do the following:
export one file to bmp
import bmp over original image (no change)
There is just a few bytes that dont get saved, and it baffles me why that information was there in the original files in the first place. As a result, the weapons in game dont come up exactly right, sometimes more than one is shown, sometimes they are off alignment.
As to what format you need
All bitmaps are saved as 8-bit (256 color) bitmaps. The palette of the bitmap does not matter when importing, as the program assumes you are importing a previously exported image, so all it does is read the indexes of the bitmap and use the internal palette to display what you have loaded. If you are loading a image 'block', then it also assumes you are importing an exported image, where it can calculate each individual image location based on the width and height of the large bmp.
At least that is how it is supposed to work. If you want you can send me your image (bmp) and i can look at it and see what new bugs you have uncovered =)