For PIC2IFF I resolved the transparency issue.
When converting 32bit PNG Icon Images to 8bit ILBM there is a loss of alpha values.
To compensate for that the BMHD for AROS ILBM images uses a Transparent Color.
After we get the index values from Neuquant using "inxsearch" such as...
/* Convert 32bit pixels to indexes */
for (x = 0; x < Size; ++x)
{
buffer(x) =inxsearch(pixelBuffer[(x*4)+3], //b
pixelBuffer[(x*4)+2], //g
pixelBuffer[(x*4)+1], //r
pixelBuffer[x*4]); //a
}
Then we get the colormap index of the first background color which is assigned in BMHD as Transparent.
//Get colormap index of first color.
BYTE map_idx = buffer[0];
After that it is simple comparison between the original color's alpha value. If less than 255 assign the map_idx. (Transparent Color).
See results in screenshot. We now have a "Transparent IFF Image" that can be used to make an IFF Icon (OS35 Glow Icon Format).