iff-convert
Information
iff-convert is a simple converter for IFF files. It can parse any IFF file and for known types it is able to generate a different representation of the data in a format usable by current operating systems.In contrast to other IFF parsing tools, iff-convert tries to cover multiple formats and also support non-standard IFF files, for example where alignment is different than 2-byte-alignment or chunk lengths are invalid.
I would like to add support for all different kinds of IFF files so feel free to help out with files that are not supported right now. I will add basic support for the contained chunks and if possible also to create binary output in a more usable format.
iff-convert is free software released under the GNU General Public License V3 or later. For details read COPYING.
iff-convert (C) 2020 Ralf Hoffmann.
Download
The current release is iff-convert 0.1 (162 kB) (signature) from 2020-07-31.
Changes
- 2020-07-31: Version 0.1
- first release
Requirements
- a POSIX compatible system and a C++14 compiler
- libsndfile
- libjansson
Installation
Compile it with$ ./configure && makeYou can install it with "make install", but you don't have to. It is a stand-alone program with no additional files required for execution.
Usage
You can start the program "iff-convert" and just give the file name and you will get some basic information, like this:FILETYPE: FORM ILBM DESCRIPTION: ILBM image ADDITIONALINFO: 240x240 (256 colors)You can select different output formats by using the option "-f". Select from "info", "text", "json" or "binary" to get different output types. "binary" is the most versatile one as it will output whatever binary format is reasonable for the IFF file. For example, for ILBM files you will get a ppm file, for 8SVX you will get a wav file and for text files you will get the converted utf8 representation.
You can use the output option "-O" to select a directory where all binary blobs are stored. This is helpful for files containing multiple writeable files, like IFF ANIMs.
You can add the option "--raw" to also get the raw content of IFF chunks.
If the IFF file is encapsulated within some other container, you can use the option "--skip-bytes" or ""--search-start" for custom start offset.
The output can be controlled by IFF chunk specific attributes. Use "--show-attributes" with a given file and "--set-attribute" to change the value.
Finally, there is a special extfs mode for use in file managers support this extension (Worker via AVFS, Midnight commander).
Supported types
iff-convert has support for multiple IFF formats with different feature set:Good support:
- ILBM
almost full support for all variants, 2-256 colors, 64 extra-half-brite, HAM and HAM8 support, 24 bit depth. output images as ppm files and separate pgm mask file. - DEEP
support for IFF DEEP files with Red, Green, Blue, and alpha component, the other components are not yet supported. output images as ppm files and separate pgm mask file. - ANIM
support for ANIM types 2, 3, 4, 5, 7 and 8, but not all option variants. output frames as individual ppm files and separate pgm mask file. - 8SVX
output contained samples as wav files.
Basic support:
- FANT
FantaVision files. Extracts ILBM images. - FTXT
extract text chunks as utf8 text. - WOWO
WordWorth files. extract text chunks as utf8 text. - SWRT
FinalWriter files. extract text chunks as utf8 text. - SSA
Clarissa animations. File are not fully valid IFF files as chunk lengths are not correctly written. iff-convert contains special handling for those chunks.
Generic support:
All other IFF files are just parsed according to the IFF standard. You can use the option "--known" to enable the handling of known chunks which may reveal some information stored in some recursive chunks like FORM chunks.Unsupported files:
In general unsupported files are just parsed as generic, but the option "--fail" will abort parsing when any unsupported chunk appears. This is helpful to add support for more files so that eventually they are at least parsed without any error.ExtFS extension
The tool can be used as part of the virtual file system extension ExtFS which is available in AVFS/Worker or Midnight Commander. It allows to browse the content of IFF files and extract individual binary blobs.To use, put the file contrib/extfs to the extfs directory and add "uiff" to extfs.ini. Then restart your application and you can access the IFF file by using the suffix "#uiff".
Links
There are other programs and libraries available for parsing and converting IFF files, all with a different feature set. Here are some links:- http://netpbm.sourceforge.net/ contains tools 'ilbmtoppm' and 'ppmtoilbm' to convert ILBM files.
- ImageMagick can display ILBM files.
- GrafX2 can open ILBM files for editing.
- ffmpeg and mplayer can play IFF ANIMs
- https://github.com/rheit/iff2gif
- https://github.com/svanderburg/libiff for generic parsing of IFF files with some extra libs for special FORM files: