Image conversion tool for the Oric machines.
- Powerful image conversion algorithm adapted to Oric's gfx constraints.
- Victor Ostromoukhov's error-diffusion coefficients.
- Works as GrafX2 external script.
- Works in command-line:
- basically accepts 24bits uncompressed BMP natively as input,
- but can use Image-magick's
convert
tool to support any other types of images.
- TAP file is created next to the input image.
- Optionally:
- Saves a BMP preview of the converted file next to the TAP file (on by default, see code).
- Adds a basic loader in the TAP file (on by default, see code).
You just then need to typeCLOAD ""
to load and display the picture on the machine. - Starts an emulator on the generated TAP file when the conversion finishes (off by default, see code).
Just copy PictOric.lua wherever you want (possibly inside the share/grafx2/scripts folder).
If you intend to use it in command-line, add the appropriate exes (convert
and luajit
) in your path or next to the lua script.
Notice:
- Windows exes are available in the tools/winb32 folder. Standalone
convert.exe
can also be found inside that installer. - For other machine/platform, you'll have to manually compile the LuaJIT and ImageMagick projects sitting in the tools folder.
-
from GrafX2, simply click on the "Fx" button in the GUI and navigate to the folder where you saved
PictOric.lua
and double click on it.Conversion takes typically around 20secs on modern machines (by 2020 standards ;) ).
-
from the command line, just run:
<lua-interperter> <path-to>PictOric.lua <filename>.<ext>
or if you are running on some linux variant where both
lua
andPictOric.lua
are on the$PATH
PictOric.lua <filename>.<ext>
where:
<lua-intepreter>
is the lua interpreter you want to use (LuaJIT.exe for instance under windows)<filename>.<ext>
is the full path to the picture you want to convert.
Conversion time is much smaller when using LuaJIT than when using the builtin interpreter of GrafX2.
The discussion about this algorithm takes place on the Defence-Force forum
Source | Converted |
---|---|