gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > batch converting gif's to use one palette

#36441 - headspin - Sun Feb 20, 2005 10:16 am

I'm looking for a program that will batch convert a sequence of images (Image0001.gif, Image0002.gif etc.) so that each image uses one universal gif palette.

Does anyone know a program that can do this?
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#36442 - tepples - Sun Feb 20, 2005 10:25 am

I'm assuming that these are all the animation cels of a given character.

GIMP has some extensions to work with sequences of numbered image files. Convert the image sequence to a filmstrip or layer stack, and then convert it to indexed color mode, which will make it use one palette. The fundamental GIMP limitation that all layers must use the same indexed palette becomes an advantage in this case.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#36445 - headspin - Sun Feb 20, 2005 1:05 pm

Yes, your right it's a character animation.

Thanks, I'll check out GIMP
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#36453 - poslundc - Sun Feb 20, 2005 9:09 pm

If you're serious about batch image processing, check out DeBabelizer. It is expensive software, but it's been the defacto standard for batch image processing as far back as I can remember.

Dan.

#36586 - headspin - Fri Feb 25, 2005 1:03 pm

I found mogrify from ImageMagick does some batch processing pretty good (and it's free).

If anyone's interested, here is how I did it:

1. Render out frames from Lightwave to PNG32 to retain alpha channel as background. Set "Fader Alpha Mode" in Render Options so character edges arn't anti-aliased.

2. Used "mogrify -format gif *.png" from ImageMagick to convert images to gif format.

3. Used GIF Movie Gear to import gif images to create global palette. Save out again as a sequence of gif's except this time each frame has the same 256 colour palette.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#36600 - tepples - Fri Feb 25, 2005 6:20 pm

Going to GIF reduces each image to 256 colors; making a single palette reduces them again. This adds two generations of noise.

Instead of going to GIF, you could keep the images in 32-bit PNG and try stacking the images as a filmstrip. Then reduce the whole filmstrip to 255 colors.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#36602 - headspin - Fri Feb 25, 2005 7:17 pm

That's a very good point there tepples.. silly me, I just realised that GIF Movie Gear can infact import PNG directly, which will eliminate the extra step and degregation of quality. Thanks for that.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game