Is it possible to store a 32-bit (ARGB) ILBM? I have tried with iffparse.library to do it, nPlanes = 32 and so forth, but MultiView just says, that the file has wrong format. When setting nPlanes = 24 it works (sort of).
Sat, 2013-01-19 01:44
#1
32-bit ILBM??
AFAIK I know IFF24 came about way before we had alpha channels on our platform. Or in the least before it was supported by software or hardware. IFF24 was curious. Geven it was mostly for RTG I would have thought they would have created it as a 1-bitplane depth image with a 24-bit pixel width. That would have made sense to me if it was from a 24-bit framebuffer.
So, rejecting 32 and accepting 24 sounds right to me, as an 8-bit RGB triplet only takes up 24-bits. Only RGB would be supported.
The ILBM format was extended to allow 32-bit (24-bit RGB + 8-bit alpha channel) for AmigaOS 4.x. I don't know how exactly this was done but the datatypes system supports it so instead of writing your own ILBM code using iffparse you could just use datatypes to output the file.
@salass00
Ok, but I need to write to the Clipboard, is that possible with datatypes?
EDIT: Found this thread, thanks. :)
Ok, I haven't changed my code to use datatypes, I probably should. But just out of interest: How do I handle images, that don't have a width of 8*somthing? Whenever I save a screenshot of the whole screen, it comes out correctly, but when I try and save a smaller image, where the width is not a product of 8, I get garbled graphics. The documentation I have been able to track down doesn't say anothing about this. I'm thinking either a) I have to skip the remaining bits whenever I write a bitplane b) I only have to skip bits when a full line has been written c) I never have to skip bits (which would be odd in my oppinion). Does anyone know about this??
Bytes per row must be an even number (pixel width must be divisible by 16, not by 8).
You can use the RASSIZE macro to calculate the number of bytes per row from the width. Use RASSIZE(width,1).
Thomas, you always have the answers! Thank you :)