Image Packing Tool?

Miscellaneous Forums/General Discussion/Image Packing Tool?

I'm looking for a tool which can take a whole bunch of images ( all of arbitrary sizes ) and pack them into a single power of 2 texture image, export to TGA, PNG or some format with proper alpha support and then export a data file which gives me the original filename and the image coordinates where I can find the image on the resulting texture.

I'm pretty sure I've used something like this before, but I can't find it now. The image packer which comes with Sprite Candy won't do it ( lots of reasons ) and GlueIt doesn't seem to do it either ( seems to want all images to be of the same size.. intended for spritesheets, I guess. )

Does this help:

http://www.blitzbasic.com/toolbox/toolbox.php?tool=54

Hi Gabriel,

My packer (linked above by Matty) does all of that except the alpha support. Its the only thing I could not get to work since the program is written in BlitzPlus and therefore the 2D images do not retain aplha.
I might look at converting to to Max though. Not sure if Pixmaps will keep alpha detail(?)

Hi Jim,

That looks like exactly what I need if it had alpha support. Would you consider sharing the source code with me on the condition that I share it back if I can get alpha support working with BMax? I have this nagging thought in the back of my mind that it's going to require a new version of FreeImage too. I'm sure I remember Snarty saying it didn't support 32bit png's either.

I don't have any experience working with PixMaps in BMax, but I do have a bit of spare time and I'd like to give it a shot, if you don't have any objections.

Would you consider sharing the source code with me on the condition that I share it back if I can get alpha support working with BMax?
No problem. Check your email.

Jim, I'll sort you out Alpha handling. You'll have to do it by retaining the alpha map as a bank, seperate to the 24Bit image. But, it works :)

Great Paul.

As you may remember before, my biggest struggle was trying to find a way to get the separate alpha data to match whatever the user does to the image. That is, the image might well be rotated, resized, re-coloured (with a new background color), flipped (X/Y).
If so, then the alpha info needs to change accordingly.

I've been thinking about re-writing for BlitzMax. However, I'm not sure if pixmaps retain alpha when manipulated and re-saved (via SavePixmapPNG).