Author Topic: What is the simplest way to export AGI resource pics to bitmap?  (Read 15855 times)

0 Members and 1 Guest are viewing this topic.

Offline Crispin

What is the simplest way to export AGI resource pics to bitmap?
« on: September 06, 2015, 03:10:17 PM »
Hi guys,
I am trying to demake original "King's Quest I" for C64 using Quill/Illustrator.
AGI line, fill etc "vector" commands are easily translatable to Illustrators. Just there is a problem with colors at char matrix (only 3 allowed at each 8x8pix). But graphics could even be improved somewhere, because of high resolution mode (width is 320 instead 160pix)
I managed to convert multi-color pics to hi-res (by hand, but ConGo is of great help)
It should be some kind of proof that porting of AGI engine to C64/128 is possible.
I suppose that real conversion should be done with DotBasic+ but... that's another story.

Where I'm stucked is converting of 80+ agi resource pics to bmp (I'm using GIMP).
So, my question is:
What is the simplest way to export agi pics to bmp (.tga, .png...)? Batch conversion if possible.

I forgot how I did it, probably by taking screenshot of WinAGI, PicEDit or so.


_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_
█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█
Nothing is as it appears.

Offline Collector

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #1 on: September 06, 2015, 05:19:28 PM »
You can use the latest of the Sierra Resource Viewer, but only one-by-one.
KQII Remake Pic

Offline Crispin

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #2 on: September 06, 2015, 07:47:53 PM »
You can use the latest of the Sierra Resource Viewer, but only one-by-one.
Thanks for that!
I missed that "Also works with AGI games"  :D
Hm, does not work for me :( seems that it can not recognize agi pics (I disabled auto recognition then, tried to change AGI "version control" but nothing).
I suppose that SCI Res Viewer can open multiple pictures at ones (open dir)?
It is possible at PicEdit.

Btw, does any other tool at "SCI Resource Utilities" work with AGI? e.g. "SCI Graphic Studio"?
_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_
█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█
Nothing is as it appears.

Offline Cloudee1

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #3 on: September 06, 2015, 08:54:32 PM »
I have always just used the "copy to clipboard" button in AGI Studio and then pasted the image.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Collector

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #4 on: September 06, 2015, 09:16:18 PM »
The SV command line tool can dump the AGI resources from the VOL files, but they would have to be converted to a standard format. With a command line tool you could easily do batch processing of AGI VOL files to extract the Pics as BMP, PCX, etc.
KQII Remake Pic

Offline Crispin

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #5 on: September 08, 2015, 08:03:18 AM »
I have always just used the "copy to clipboard" button in AGI Studio and then pasted the image.
Thanks for suggestion.
I have to test it, I can c&p text (even between Wine & Linux), but I didn't manage (yet) to copy pics between 2 apps in Wine. Actually, I think that every app in Wine has its own enviroment. But there is solution for that too, I'll post it when I have some news about it.
The SV command line tool can dump the AGI resources from the VOL files, but they would have to be converted to a standard format. With a command line tool you could easily do batch processing of AGI VOL files to extract the Pics as BMP, PCX, etc.
Thanks for that, it will be *the way* I suppose.
This should be solution, from CLI. I'm rusty with that (DOS batching), but I'll manage it.

Btw - MY MISTAKE: I tried to open pics resource with SCI Res Viewer that were  - already extracted.
However, there is another problem: when I open dir (VOL?), I can see only words & objects (text).
I hope I'll manage to do it with SV CLI tools (Graphics.exe & Resource.exe).


Guys, don't be mad if I don't replay immediately: I'm busy right now and messing with AGI is my hobby project, so please allow me some time to study things and answer.

EDIT: forgot to mention, funny thing: when I open PicEdit from AgiStudio, WINE starts DOSBox - it shows up and just close. However, it is funny that one emulator calls another one :D
« Last Edit: September 08, 2015, 08:20:44 AM by Crispin »
_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_
█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█
Nothing is as it appears.

Offline Collector

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #6 on: September 08, 2015, 11:36:54 AM »
To extract resources from an AGI VOL file use the following:

Code: [Select]
Resource.exe VOL.0
You will have to do this for each VOL file.

As far as PicEdit, use Lance's newer Java port rather than his old DOS version.
KQII Remake Pic

Offline Kawa

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #7 on: September 08, 2015, 01:23:42 PM »
WINE starts DOSBox - it shows up and just close. However, it is funny that one emulator calls another one :D
But... Wine is not an emulator :D

Offline Collector

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #8 on: September 08, 2015, 02:23:21 PM »
WINE starts DOSBox - it shows up and just close. However, it is funny that one emulator calls another one :D
But... Wine is not an emulator :D
ZING
KQII Remake Pic

Offline Crispin

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #9 on: September 10, 2015, 07:47:39 AM »
WINE starts DOSBox - it shows up and just close. However, it is funny that one emulator calls another one :D
But... Wine is not an emulator :D
ZING
OMFG stop trolling... technically, of course it is not. But purpose is the same. Be sure that I know what VirtualBox, QEMU, VMware are and what is the difference between vm & WINE. Of course that you can't jump from one "sandbox" to another just by (virtual) system call.
WINE is ("just") a "compatibility layer" capable  of  translating "Windows API calls into POSIX calls on-the-fly".
(edit btw even 2 vm could exchange data between, so it is regardless of "is WINE emulator or not")
You're missing the point: possibilities of running another one  "strange" process (such as DOSBox). Because both lie on same file-system, it is possible to change files outside of WINE and reload it in same app (same session) that made request for.
Of course, it is not possible without extra settings and without giving extra permissions, because of architecture of *nix systems. But there is a possibility, and I find it amusing.
« Last Edit: September 10, 2015, 07:54:36 AM by Crispin »
_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_
█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█
Nothing is as it appears.

Offline Crispin

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #10 on: September 10, 2015, 01:14:09 PM »
To extract resources from an AGI VOL file use the following:

Code: [Select]
Resource.exe VOL.0
You will have to do this for each VOL file.

As far as PicEdit, use Lance's newer Java port rather than his old DOS version.
(Of course I'm using Java PicEdit. Btw WINE can open DOS PicEdit by forwarding it to DOSBox, but it works only from command line.)

I did extract picture resources with Resource.exe (I already extracted them before with WinAGI with same result).
However, I have not luck with Graphics.exe ("Error processing picture.xx").
Maybe it got something with missing *.pal according to this message:
"If you want pictures to be exported exactly as seen be sure to use -v (and probably -pal) options."
...but this is beyond my scope. And it should be optional. All I find about is this message at forum.
Then I tried with SCI picture resource and it just works. It works from Sci Res viewer (gui) too, of course.
Unfortunately, "SCI enhanced" version has a totally different graphics from AGI so it does not helping me.

I've got interesting WINE system messages about missing .NET dependencies before cli started, maybe I'll find a way to fix it.
Btw if somebody's trying to run those cli @Linux don't bother with DOSBox (common mistake - it is Win32 app), or just click on it  - it won't work.
First invoke WINE cmd from terminal (~ $ "wine cmd"), as you should start "cmd" from "Run" @Windows I suppose.
_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_
█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█
Nothing is as it appears.

Offline Collector

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #11 on: September 10, 2015, 07:37:20 PM »
The Resource Viewer is too new to be DOS tools, so yes the CLI tools are Win32 console apps. I have had issues with many of the specialty tools, so I usually just use Resource.exe. If I invoke it from a batch file or one of my frontends I just have it dump the output to a new folder and delete all of the type of resources other than what I am working with. I really wish the author of SV had released the source before fading into the woodwork, but he said that he no longer had the source when I asked.
KQII Remake Pic

Offline Crispin

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #12 on: September 12, 2015, 12:01:47 AM »
The Resource Viewer is too new to be DOS tools, so yes the CLI tools are Win32 console apps.
Actually it is easy to run Win32 console apps from plain DOS (DOSBox...). Just some DOS extender is needed. DOSLFN (long filenames support) is of great help too.
I did it with HX DOS Extender; resource.exe and graphics.exe both works.
(There's even more, it is possible to run some basic OpenGL/DirectDraw/SDL Windows apps.)
« Last Edit: September 12, 2015, 12:06:46 AM by Crispin »
_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_
█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█
Nothing is as it appears.

Offline MusicallyInspired

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #13 on: September 12, 2015, 01:48:47 AM »
Cool! I assume DOS4GW and CWSDPMI work as well? Why haven't I thought of this before...
Brass Lantern Prop Competition

Offline Crispin

Re: What is the simplest way to export AGI resource pics to bitmap?
« Reply #14 on: September 14, 2015, 02:20:41 AM »
Yes, DOS4GW and CWSDPMI do work.
If you specifically need DOS4GW, it is smart to replace it with DOS/32 and just rename DOS32A.EXE to DOS4GW.EXE (or use some other method, all explained at DOSBox Wiki).
Because it is designed to be faster and more stable with modern systems than the original. And it is free (open source).
HX is also good option, and it comes with it's own HDPMI server (host) which is fully compatible with CVSDPMI (more info about it at DrDos Wiki).
For more info:
- There is a short comparision of DOS4GW and alternative DOS extenders at MaximumHoyt
- Some list of DOS extenders and DPMI hosts at TheFreeCountry

EDIT: Just to be precise, DOS(Box) with HX DOS expander handles Sierra Resource Viewer command line tools, but it is still not possible to export AGI picture/view files to easily readable bitmap format with graphics.exe. At least not for me. But it works with SCI files.
« Last Edit: September 14, 2015, 03:52:59 AM by Crispin »
_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_
█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█▓▒░_░▒▓█
Nothing is as it appears.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.069 seconds with 22 queries.