color library

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 22 02:53:38 PDT 2015


On 22/06/2015 9:15 p.m., Kagamin wrote:
> On Monday, 22 June 2015 at 08:45:38 UTC, Andrea Fontana wrote:
>> They used to pack alpha informations with other pixel infos (color)
>> just for simplicity and to have a convenient way to store info inside
>> a file, I guess.
>
> Separate mask has an advantage of lower memory consumption: it can have
> 1-bit depth. It was important in 90s when you didn't have lots of RAM
> and HDD and didn't need transparency deeper than 1 bit, masks were used
> to only outline a crop region, which worked with RLE compression well
> further decreasing mask size, so it made no sense to waste space on
> 8-bit alpha channel.

Thank you. That use case does make sense.
I think I might add it as an optional feature anyway. For e.g. embedded 
devices. The mutation algorithms can reasonably easily handle this 
specific case in image storage.


More information about the Digitalmars-d mailing list