@magorium
"with regards to Amiga OS3.5 icons (as you name them, I call them glowicons)."
They are Classic Amiga Icons with the OS3.5 Extension for IFF data (Glow Icons).
"Those files consist of a classic info disk structure (might or might not contain a newicon structure in the tool-types), followed by an IFF icon structure (the actual glowicon bits)."
Yes. That is correct. See:
http://www.evillabs.net/index.php/Amiga_Icon_Formats"A GlowIcon is thus an IFF structure with a ICON identifier which can contain the (newly added) chunks FACE and IMAG. The file may or may not contain multiple IMAG chunks (though a minimal of 1 and maximum of 2 makes sense in this context)."
The IFF data should contain two IMAG chunks for images but it could contain one or none. If it contains only one image we only export one image. If it contain no IMAG chunks for images but it contains one or two ARGB chunks attached to the end of the IFF data then it's an OS4 icon which is a Classic Amiga Icons with the OS3.5 Extension without IMAG but ARGB instead. If it contains one or two IMAG & one or two ARGB chunks then it is an AROS ARGB Icon format. I have two functions called Get_IFFOffset & Get_IFFType to deal with these icons styles. The first function will read through all the classic icon data starting with file signature then the diskobject data till it gets to the beginning of the IFF data that starts with 'FORM' then it returns that offset. The second functions uses IFFParse Library starting with that IFF offset to parse the IFF data looking for the IMAG & ARGB chunkID's. If they are found see above for the explanation of determining the icon style based on the image data present in the IFF data. As far as reading the IMAG images & converting that information into planar data to write to an ILBM along with the colormap. Icon Library uses IconControl to get the image data & the colormap data. I don't have a native method yet to read the IMAG & colormap data directly but I'm working on native methods to read classic icons to save the images.
"The question: do you expect these IMAG chunks to be saved in a individual manner ? Is there any software out there that is able to manipulate (read: extract/ combine) the images contained in such an IFF file and perhaps more importantly if the IMAG chunks would to be saved individually how would you want to combine them again ? atm I am not 100% sure (yet) i can save them without loosing any (important) information that gets lost (icon wise, not graphical data wise)."
The IMAG chunks & colormap data for each image will be exported to ILBM separately with one image per file. Once the ILBM images are exported the icon attributes that are stored in the icon file are no longer accesssible. As far as we are concerned to re-combine them requires rebuilding the classic icon data starting with the diskobject data, etc. There is a sample of that in ilbmtoicon to Save Classic Icon. In order to save the ILBM images to files there is a Save_Bitmap function that I put in INFO data that will allow saving ILBM images.
"E.g. can you read/manipulate a IFF ICON file with using existing library functionality (or your own created functionality) ?"
I have been using library functions for AROS. But in order to read the classic icons on any other operating system we will need to do it in a more generic way. We have to access the data directly by reading the offsets and the cunkID's & chunk data contained in the icon file. Reading the IFF images directly should be straightforward. I will provide program samples of all the obove as far as getting the correct offsets, reading the IMAG chunks & saving ILBM's. For simplicity I will just post a zip archive with the pertinent information for reading icons.
"Reason I ask is a simple one: Although I understand the glowicon file format structure and internals of the IFF storage format I seem unable to find any information with regards to details on for example the compatibility of an IMAG chunk wrt the ILBM format, e.g. It might be that an IFF ICON is able/allowed to contain bit-resolutions that are not (by default) supported by the ILBM format (I currently do not contain the knowledge but do remember something with AROS and ILBM wrt higher bitdepth resolutions not being 100% correct supported: I do not know if that still is an issue)"
If it is a Glow Icon with IFF image data & it is more than 8 bitplanes of image data then that represents an error situation. It must be 8 bitplanes or below. The ARGB data is 32bit data.