Welcome, Guest. Please login or register.

Author Topic: Two converter programs for a lot of platforms  (Read 2174 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline tchTopic starter

  • Newbie
  • *
  • Join Date: Apr 2015
  • Posts: 1
    • http://oscomp.hu
Two converter programs for a lot of platforms
« on: May 02, 2015, 03:53:22 PM »
Recently i released my Wav to 8SVX and PNG to ILBM converters.

Currently supported platforms for both converters are Amiga 68000/68020/68020+68881, Linux i386/AMD64/PowerPC, FreeBSD i386/AMD64, Solaris i386, Haiku i386 and MorphOS PowerPC. FreeBSD PowerPC and Mac OS X PowerPC will soon arrive. AROS i386 port is failed to build, if anyone knows why, then please tell me. Logs on the download pages.

The binaries are standalone, they don't need external libraries on any platform, with the exception of the pure 68000 and 68020 Amiga versions which are needs mathieee*.libraries for floating point calculations. The 68020+68881 version don't needs FP libraries, but naturally it needs an FPU.



The Wav converter can convert any kind of PCM Wav to 8SVX, on any bit per sample and any channels. It supports resampling too. (Just downsampling, not up.)

Can be downloaded from here: http://bgafc.t-hosting.hu/wav28svx.html

The PNG converter can convert any kind of PNG to ILBM, including alpha and 16-bit per channeled ones. Supports resampling, dithering and quantizing to any number of bitplanes from 1 to 8, including EHB.

There's some basic usage examples. All of the converted images are converted from this image: http://oscomp.hu/depot/ferrari.png
With the exception of Amiga, which converted a pre-shrinked version of this image. (Due the limited memory in my A500+, it wasn't able to deal with a HD image.)

For example:
Code: [Select]
png2ilbm ferrari.png ferrari_ehb.iff -w=320 -d -bp=ehb

(I show the result pictures converted back to PNG, to make them viewable from browser, but there are also links to the IFF files.)


(http://oscomp.hu/depot/ferrari_ehb.iff)

The converter also supports hi-res/laced pictures:

Code: [Select]
png2ilbm ferrari.png ferrari_8hril.iff -w=640 -bp=8 -hr -il -d


(http://oscomp.hu/depot/ferrari_8hril.iff)

If there is a need to convert a picture which can only use certain registers, then the others can be preserved:
Code: [Select]
png2ilbm ferrari1.png ferrari_5pr.iff -d -bp=5 -pr=0-7,17-19
With this line, a 5-bit picture is converted from the original, but colour registers 0-7 and 17-19 are preserved, thus the image uses only 21 colours.
(If the target bitplane number is EHB, then the preserved registers will extended to the upper 32 imaginary registers too, since if e.g. register 11 is unusable, then register 43 will be unusable too.)


(http://oscomp.hu/depot/ferrari_5pr.iff)

It's possible to override colour register during quantization. These registers will be also preserved during the quantization, but then they will be used during the colour replacing.
It can be used for partial colour adds (for example if the picture can use the registers used for other purposes, but cannot overwrite them), but also can be used to quantize to a fixed palette.

Code: [Select]
png2ilbm ferrari.png ferrari_c64.iff -w=320 -d -bp=8 -srl=[url=http://oscomp.hu/depot/c64-136.pal]c64-136.pal[/url]

This picture uses the Commodore 64's 136 coloured palette.


(http://oscomp.hu/depot/ferrari_c64.iff)

To use override from CLI, use the "sr" switch, the "srl" is to load the override list from a file. The format for them is identical: register:colour,register:colour,register:colour...

All of the generated pictures uses 24-bit palettes, but the converter can forced to convert them to 12-bit ones. The non-AGA Amigas are able to show the 24-bit palettes, but they only use the top 4-bit, which are not colour-correct shrinking, since for example $e1 will be $e, but in reality it should be $d ($e1 is much closer to $dd than $ee).
So, with the "f4b" switch the converter will colour-correctly shrink all the colours, then extend them again (also colour-correctly). By this the non-AGA machines will show the colours without brightness shifting.
However, since the quantizer works on 24 bit and the shrinking happens after the palette quantization, it can produce collosions, which can be more worse, than a non-correctly bright picture. (E.g. both the colours "3f89b1" and "4590a9" will be "4488aa" and the final image will use less colours.) So, use with care.

The quantizer eats up a lot of memory (around 7-800k), so on the Amiga, at least 2 MB RAM is recommended. With 2 MB of Chip RAM, there should be no problem about converting 320x200@24 pictures. (My A500+ managed to convert them during the tests, with only 2 MB of Chip RAM.)
If there are plenty of RAM (cca. 16 MB), then even HD pictures can be converted on the Amiga. (Well...slow water washes the coast, a HD picture can take much hours for a pure 68000.)

Can be downloaded from there: http://bgafc.t-hosting.hu/png2ilbm.html



Well, have fun and don't forget to report bugs. :P
The binaries contains the detailed manual about everything, but if there are questions, then ask them.