Page 1 of 2

Image processing on Windows

Posted: Mon Jul 12, 2010 9:25 pm
by iron
Years ago when I had a Mac, I had this lovely app called GraphicConverter that could 1. create a 256 colour palette from a bunch of bitmaps, 2. let you edit that palette, and 3. index a bunch of bitmaps to that palette. This was essential prior to ambering unit renders.

Does anyone know of a (preferably free) application that can do the above on Windows?

Re: Image processing on Windows

Posted: Tue Jul 13, 2010 1:41 am
by GodzFire
Paint.Net - http://www.getpaint.net/
Completely free, and like a Lite version of Photoshop. I think it's just what you are looking for.

Re: Image processing on Windows

Posted: Tue Jul 13, 2010 8:18 am
by iron
I've got that installed - from what I can tell its GUI doesn't let you index an image to 256 colors using a pre-defined palette. Nor does it appear to have any kind of batch mode for processing hundreds of images in a single hit.

Lots of tools are available to convert from truecolor to indexed, but everything I've seen just calculates its own palette on a per-image basis. For Myth collections that just doesn't work - all images must have the same palette and the first three colours in the palette have to reference the background colour & then two unused colours.

Re: Image processing on Windows

Posted: Tue Jul 13, 2010 9:23 am
by Myrd
I think ImageMagick may be able to do what you're after.

Re: Image processing on Windows

Posted: Tue Jul 13, 2010 4:06 pm
by Khadrelt
Does IrfanView do that kind of stuff? Haven't used it myself, but I've heard it's a decent GraphicConverter-like tool for Windows.
http://www.irfanview.com/

Re: Image processing on Windows

Posted: Tue Jul 13, 2010 6:26 pm
by Point
oak maybe could index the .pngs after import... :) .... or maybe no indexing at all..

anyway photoshop works via batch scripts though definitely not as simple as graphiconverter which i still use for collections.. im sure someone has a nice myth script made for photshop.... Post it ...

Re: Image processing on Windows

Posted: Tue Jul 13, 2010 6:53 pm
by Graydon
Just for your information Iron, using Oak, you only have to predefine the first 2 colours now, giving you one extra to batch with :)

Re: Image processing on Windows

Posted: Tue Jul 13, 2010 10:18 pm
by iron
Thanks Gray, didn't know that :)

Just need to figure out how to do the batching! If I find an indexing method it'll help everyone else who wants to make collections on Windows ...

ImageMagick can do batch processing - its made for it actually - but it does not let you index images using a predefined palette. If I can't find a solution I might even look at rummaging through ImageMagick's sourcecode & adding it as a feature.

IrfanView - I haven't tried that. Thanks, will give it a run & see what its capable of.

Re: Image processing on Windows

Posted: Tue Jul 13, 2010 10:46 pm
by GodzFire
Should we even ask what you are making?

Re: Image processing on Windows

Posted: Tue Jul 13, 2010 11:37 pm
by iron
At the moment, I'm not making anything. No point modeling a new unit (if that's what I'm thinking of, and perhaps I'm not) if there's no way of indexing the renders ;)

Re: Image processing on Windows

Posted: Tue Jul 13, 2010 11:57 pm
by Myrd
Iron, have you seen this page:

http://www.imagemagick.org/Usage/quantize/

Search for "generate a common color table for all the images involved".

EDIT: Also: http://www.imagemagick.org/Usage/quantize/#map

Re: Image processing on Windows

Posted: Wed Jul 14, 2010 12:42 am
by iron
Yes, that _almost_ works, but not quite.

It will use the colortable from the "map" image and use it to index the other images, however in doing so it reorders the colortable. Each of the output images will have an identical color palette, but the blue transparent color will no longer be first - it could be anywhere in the table.

So close, but so far :(

Re: Image processing on Windows

Posted: Wed Jul 14, 2010 6:37 am
by Myrd
iron wrote:Yes, that _almost_ works, but not quite.

It will use the colortable from the "map" image and use it to index the other images, however in doing so it reorders the colortable. Each of the output images will have an identical color palette, but the blue transparent color will no longer be first - it could be anywhere in the table.

So close, but so far :(
:( - though it sounds like it may not be too hard to change that behavior to preserve the order and send them a patch.

Re: Image processing on Windows

Posted: Wed Jul 14, 2010 4:20 pm
by Melekor
It should be easy to rearrange the palette afterward using a second tool. If this is for making myth units we can add that functionality into Oak.

Re: Image processing on Windows

Posted: Wed Jul 14, 2010 5:09 pm
by Myrd
Melekor wrote:It should be easy to rearrange the palette afterward using a second tool. If this is for making myth units we can add that functionality into Oak.
In fact, at one point this would just work with Oak. It had some code to detect if an image is "color-compatible" with the existing collection without having the exact same color table (i.e. all colors used in the image are in the collection's color table - even if the image is not saved in an indexed format) . So you'd be able to import those images just fine despite the color tables being in different order.

I think this may no longer work with the current version (not 100% sure though) - as Melekor convinced me that that feature wasn't generally useful.