32-bit ILBM??

7 posts / 0 new
Last post
alfkil
alfkil's picture
Offline
Last seen: 4 months 1 week ago
Joined: 2011-05-10 22:02
32-bit ILBM??

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).

hypex
hypex's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 2011-09-09 16:20
AFAIK I know IFF24 came about

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.

salass00
salass00's picture
Offline
Last seen: 7 months 2 weeks ago
Joined: 2011-02-03 11:27
The ILBM format was extended

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.

alfkil
alfkil's picture
Offline
Last seen: 4 months 1 week ago
Joined: 2011-05-10 22:02
@salass00 Ok, but I need to

@salass00

Ok, but I need to write to the Clipboard, is that possible with datatypes?

EDIT: Found this thread, thanks. :)

alfkil
alfkil's picture
Offline
Last seen: 4 months 1 week ago
Joined: 2011-05-10 22:02
Ok, I haven't changed my code

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??

thomas
thomas's picture
Offline
Last seen: 1 week 5 days ago
Joined: 2011-05-16 14:23
Bytes per row must be an even

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).

alfkil
alfkil's picture
Offline
Last seen: 4 months 1 week ago
Joined: 2011-05-10 22:02
Thomas, you always have the

Thomas, you always have the answers! Thank you :)

Log in or register to post comments