Community

SCI Programming => SCI Development Tools => Topic started by: MusicallyInspired on January 09, 2019, 04:54:00 PM

Title: Command line batch processing
Post by: MusicallyInspired on January 09, 2019, 04:54:00 PM
Is this possible at present? I don't remember if custom command line tools were developed or not. Specifically, I would like to extract and convert every PICTURE resource (or any graphic resource I suppose, but mainly PICTUREs) from a game as PNG files. Can we have this added at least as a right-click menu option when selecting multiple PICTURE resources in SCI Companion? We can mass extract/export as patch files, but we can't mass convert.
Title: Re: Command line batch processing
Post by: Kawa on January 09, 2019, 05:00:26 PM
I used the command-line SV tools to generate the SCI and AGI folders in my background archive. Had a batch file that first used resource.exe to extract it all, then graphics.exe to convert the pictures. Then pngout to convert from BMP to PNG because I seem to remember something was fucky about the results if I let SV do it or sumth...

Can't find the batch file now, of course.

But let me at least help you not have to look for the damn toolset.
Title: Re: Command line batch processing
Post by: pmkelly on January 09, 2019, 07:15:06 PM
Not related to SCI as such, but for the new version of AGI Studio, I'm developing everything as a TypeScript library and will have all this functionality exposed through a CLI interface which wraps the main library functions. You'll be able to use the library from JavaScript/TypeScript code to do things like batch processing.
Title: Re: Command line batch processing
Post by: troflip on January 09, 2019, 07:24:25 PM
SCI Companion:
Tools -> Extract All Resources
Make sure the Generate Bitmaps For Pics is checked.

It generates .bmp files, but there's plenty of tools to convert to .png.
Title: Re: Command line batch processing
Post by: MusicallyInspired on January 09, 2019, 07:29:40 PM
Oh sweet! Didn't notice that checkbox (to be honest, I never got that far to bring up the dialog. I assumed it was an instantaneous action without any customization. You know what they say about assuming...). Thank you. I'll use this.

However, I'm having fun programming my batch file to process everything from command line so I'm still going to do that too. lol