extracting shapes as PNG
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
extracting shapes as PNG
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 ]
...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
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.
The prefered way to handle these files is really the shp format and using Gimp. This way you can see the frames way better.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Re: extracting shapes as PNG
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
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).
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).
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Re: extracting shapes as PNG
Or you could adapt the shp2pcx utility to shp2png.
Re: extracting shapes as PNG
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.
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
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
Ipack is losing transparency info? That's a bug.
Re: extracting shapes as PNG
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
I thought ipack produced .png's.
-
- Site Admin
- Posts: 731
- Joined: Thu May 14, 2020 1:34 pm
Re: extracting shapes as PNG
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
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
After PCX dissection I can confirm it: no transparency info!
Is there any hope of PNG output with some future release of the tools?
Is there any hope of PNG output with some future release of the tools?
Re: extracting shapes as PNG
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?
Any kind soul out there?
Re: extracting shapes as PNG
You can look at Exult's use of the PNG library in the 'shapes' directory.
Re: extracting shapes as PNG
What about IrfanView? Doesn't that do batch conversions between format with the option to preserve transparency?
http://www.irfanview.com/
WtFD
http://www.irfanview.com/
WtFD
Re: extracting shapes as PNG
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
WtFD