jsummers / deark

A utility for file format and metadata analysis, data extraction, decompression, and image format decoding
https://entropymine.com/deark/
Other
169 stars 10 forks source link

Picture Packer support #77

Closed Sembiance closed 3 months ago

Sembiance commented 3 months ago

3 popular picture formats existed for the Atari ST called Picture Packer: http://fileformats.archiveteam.org/wiki/Picture_Packer

The only 2 modern converters that support these formats are Konvertor and abydos (which is no longer maintained and is crashes with many files).

It would be awesome if deark could support these formats. The file formats wiki has links to the Low, Med and Hi res samples and has some other links to useful info.

You can examine the abydos conversion code in abydos-0.2.10.tar.xz specifically plugins/atari/stos.c and plugins/atari/atarist.c

jsummers commented 3 months ago

I'm going to try to support this. It's not easy to figure out, though. It has some similarity to AMOS Picture Bank, but it's not the same.

jsummers commented 3 months ago

Deark can now decode all five of the Picture Packer and/or STOS Packed Screen image formats. But it often doesn't detect the correct format. I'll work on that next, though I think it won't always be possible.

Sembiance commented 3 months ago

Awesome!

jsummers commented 3 months ago

I've found a 6th format, maybe only used by ".DAJ" files in packages like this one.

Distinguishing these formats is a real problem. For example, contrary to some reports, most "Picture Packer PP1" files do not use the ".PP1" file extension.

For now, you have to use "-opt stos:pp1", "-opt stos:pp3", or "-opt stos:m4p" to decode the nonstandard formats.

Sembiance commented 3 months ago

New code works great! Handles all the files I threw at it, just fine :)

Thanks so much for adding support for it. deark continues to be a great tool for preserving out digitial history.

Not sure if you are totally done, so feel free to close out this issue once you feel it's all done. Thanks again :)

jsummers commented 3 months ago

I think I've done about all I can easily do, as far as guessing the correct image type. It's possible to do better, but it may require high technology. Analyzing the palette to make a guess as to how many colors are significant is one idea.

Here's an example of a file where Deark still gets it wrong: CLKNDAG1.MBK