Page 1 of 1

possible image converter in the werks

Posted: Thu Aug 21, 2003 11:24 pm
by Sirgalahadwizard
Yeah, you heard me.

Got some inspiration from MacBeth's .spr replacement, and my own angst over getting images in the proper format for spray w/o using photoshop (which didn't pan out anyway).

My goal is to make an image converter that takes .gif, .bmp, or some other mundane 8-bit formats and composes them into those tough-to-make .raw files that Spray wants.


Things I know the program will do (or will try to do):
* Read palettes directly from the source image and save them as .act for Spray to use.
* Option to read palettes from a single, universal image (for those willing to use a global palette).
* Save both the palettes and output images with height and width information in the filename (and in the way that you can use the "import by name" function in Spray).



Only things that'll be goofy with the program are the following:
* Will be made in Java, so it wont be as convienient to run.
* Wont check to see if the size of the images is okay.
* Wont check to see which format the images are - name extentions accordingly.
* Use at own risk, it's a VERY simple program (ie, no exception throwing, no window interface... it simply asks for filenames as it goes along).
* Wont do any image modifications - like halving or color changing.
* You'll need an accompanying 8-bit image for the alpha values (will assume names).
* As is implied... will only do the dirty work before spray gets ahold of the images; wont actually make the .spr files for you.



For now, the only assistance I need:
* The formats of the imported images (gif, bmp...)
* The format of the ".act" photoshop palette
* The outputted structure of the .raw files.
* maybe some advice on read/write algorithms (if I get stuck).
(all substantial help with the above will be rewarded in the credits)


I decided that it'd be possible to make a program like this because Spray's maker listed the basics behind the .raw file needed (every other byte = the alpha value; interleaved; no header)


Basically, it's a toddler's project. I'm not trying very hard because I've got other things to concentrate on (just like the creator of spray, I only want something that just works).

I think i'd make alot of people happy to not need photoshop to make images for FOT... and if it doesnt, i've got another program for my CS portfolio.

Posted: Fri Aug 22, 2003 10:45 am
by MacBeth
interesting idea, unfortunately i wont be for you any assistance because my programming skill are limited to c++/tp7 (high school level language complexity)

Posted: Fri Aug 22, 2003 2:09 pm
by Jimmyjay86
To simplify things you may want to relegate it to a few image formats like gif, png, and maybe tga. These formats can store alpha channel information and are supported by every image program. I'm sure there are sites out there with plenty of info on these formats ehich could help you.

Good luck man!

Posted: Fri Aug 22, 2003 8:59 pm
by Sirgalahadwizard
Eh.

Mostly my biggest problem has been with the image writing module. I make the program load the source image and it's alpha image, then theoretically the right thing to do is simply write the pixel info - with the odd numbered bytes being the alpha channel.

Unfortunatly, I must have got the formula wrong or something because the images are really distorted when I load them in spray (and yeah, I made sure the new size dimensions were input).

On the bright side though... it outputs .act palette files perfectly :p.

The principal base format is .bmp.

I ended up decoding the .bmp format myself, and found that it draws pixels from the upper right corner and somehow ends in the lower right corner. I tried .gif format first, but it stumped me.

I may just end up doing simple .raw files and making a utility to make em' all snazzy for spray (since 8-bit raw is practically nothing but image indexes - nothin but the sweet stuff).



I'm seriously thinking about porting it to a little-known game development software known as "Game Maker". It can make lotsa other stuff besides just games, it has a GUI-driven programming language that's remarkably simple. It also makes actual .exe files you can run from command-line.

I reckon that i'll have to re-write the program before it's all over anyway, it's a jumbled mess at the moment and i've got better ideas for streamlining it.

Posted: Fri Aug 22, 2003 9:47 pm
by Flamescreen
This game-maker reminds me of something. what's the full name and the company making it? I have several such programs and want to see if this is one of them(In which case I could use it there).

Posted: Wed Aug 27, 2003 9:22 pm
by Sirgalahadwizard
Well, scratch the game-maker idea.

It only writes "real" number values, I can't get it to write single bytes (as in, it probably writes numbers as those huge 8-byte ones - like Long and Double).

However, it'd probably work to make my own editor for my own game (ie, FTTools ish).

Oh... You can find game maker by simply searching for it on yahoo.
The address (already looked for it) is http://www.gamemaker.nl/

It was designed by Mark Overmars.

It's GUI driven and takes alotta the mystery out of organizing game development. Furthermore, it's got a powerful scripting language in it that isn't too different than C or Java.

The only unfortunate downside to that language is that it's designed specifically as a scripting language, so it's overly simplistic (ie, my problem of wanting to write byte values). I'm also not too sure if you can set up methods with their own arguments or design class-heirarchies; so it might not qualify as an object-oriented language.

It's still good programming experience for beginners though! (hint hint, calling all newbies)

Posted: Thu Aug 28, 2003 1:24 pm
by Flamescreen
Sirgalahadwizard wrote:Well, scratch the game-maker idea.


Oh... You can find game maker by simply searching for it on yahoo.
The address (already looked for it) is http://www.gamemaker.nl/

It was designed by Mark Overmars.
Erm,...the footbal player??? :shock:

Posted: Fri Aug 29, 2003 10:37 pm
by Sirgalahadwizard
No, but then again i'm not much into sports. It'd also seem that he was from the neitherlands too (the '.nl' at the end of the address).