Page 1 of 1
extracting shapes as PNG
Posted: Sun Jun 06, 2004 5:36 am
by Andrea B Previtera
I think I am posting this twice but...
...you know, my memory has serious holes :\
I wanted to know if there's a way to batch-extract shapes in PNG format. I can do it in GIF with the Exult tools and some codearound... but no PNG. Am I wrong? Any hint?
[edit by wjp: you should really give threads descriptive subjects
]
Re: extracting shapes as PNG
Posted: Sun Jun 06, 2004 7:45 am
by Dominus
The problem is that the shapes normally contain more than one frame and png only supports one frame (shot me if I'm wrong).
The prefered way to handle these files is really the shp format and using Gimp. This way you can see the frames way better.
Re: extracting shapes as PNG
Posted: Sun Jun 06, 2004 8:06 am
by Andrea B Previtera
Hm, ok - I didn't actually mean Shapes but Frames. Infact you *can* extract every frame with the exult tools... only they're saved in PCX... GIF... or something like that
Re: extracting shapes as PNG
Posted: Sun Jun 06, 2004 8:12 am
by Dominus
yeah it works fine extracting frames to pcx. Ipack might be extendable to extract all frames of a shape and save them to png.
I'm sure there are tools to batch convert pcx to pngs. In Windows you can use irfan view to do this (supports command line batch converting, I think).
Re: extracting shapes as PNG
Posted: Sun Jun 06, 2004 9:24 am
by wjp
Or you could adapt the shp2pcx utility to shp2png.
Re: extracting shapes as PNG
Posted: Sun Jun 06, 2004 1:14 pm
by Imajin
Actually I rigged up a simple method once...
If you have the Exult tools, copy "SHAPES.VGA" (for example) and PALLETES.FLX to that folder, and make two files in Notepad.
One should be a batch (.bat) file with one line:
ipack -x test.txt
Name the other test.txt, and put the following lines into it:
archive SHAPES.VGA
palette PALETTES.FLX
xxx/32: /
Relace XXX with the shape number, which I beleive can be discovered in Exult Studio. Also, the 32 is the number of frames the average character shape has (Remember, though Studio says 31, 0 is counted in that). Other shapes may have mroe or less.
Re: extracting shapes as PNG
Posted: Sun Jun 06, 2004 11:15 pm
by Andrea B Previtera
The point is that when IPack extracts frames to PCX, the transparency mask is lost! Otherwise of course I'd be batch converting to PNG...
Re: extracting shapes as PNG
Posted: Mon Jun 07, 2004 6:44 am
by drcode
Ipack is losing transparency info? That's a bug.
Re: extracting shapes as PNG
Posted: Mon Jun 07, 2004 7:18 am
by Andrea B Previtera
Yes, pcx files (at least with the last Ipack I used! I don't know now) haven't transparency information
Re: extracting shapes as PNG
Posted: Mon Jun 07, 2004 9:10 am
by drcode
I thought ipack produced .png's.
Re: extracting shapes as PNG
Posted: Mon Jun 07, 2004 9:54 am
by Colourless
Are you sure that you are not making a mistake. If there isn't transparency information in the format, then the transparent colour is Index 255.
Re: extracting shapes as PNG
Posted: Mon Jun 07, 2004 11:04 pm
by Andrea B Previtera
Maybe it's just a photoshop glitch then - since PNG and GIF files are correctly transparency-masked once loaded, while PCX files are not..
Re: extracting shapes as PNG
Posted: Mon Jun 14, 2004 1:58 am
by Andrea B Previtera
After PCX dissection I can confirm it: no transparency info!
Is there any hope of PNG output with some future release of the tools?
Re: extracting shapes as PNG
Posted: Mon Nov 15, 2004 7:23 am
by Andrea .B. Previtera
Hee-hoo! Here we go with the monthly call about PNG output from the Exult tools
Sorry, it's not plain lazyness: I'd happily contribute to the code and add it by myself, but I should learn the png format, how to compile exult, etc. etc. - which I really don't have time to : (
Any kind soul out there?
Re: extracting shapes as PNG
Posted: Mon Nov 15, 2004 8:32 am
by drcode
You can look at Exult's use of the PNG library in the 'shapes' directory.
Re: extracting shapes as PNG
Posted: Mon Nov 15, 2004 10:11 pm
by Withstand the Fury Dragon
What about IrfanView? Doesn't that do batch conversions between format with the option to preserve transparency?
http://www.irfanview.com/
WtFD
Re: extracting shapes as PNG
Posted: Mon Nov 15, 2004 10:17 pm
by Withstand the Fury Dragon
EDIT: I thought it let me define a transparent colour for each image, as well. In fact, I recall as much, because it helped me do some PNG image-compression (with preservation of transparency) for a friend's website.
WtFD