Working on a library: request for code review
Mike via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jun 17 11:35:32 PDT 2014
Thanks, will work on fixes tonight.
> The current method will not detect an error when the image type
> is not mapped but a color map is present.
> At least I assume that is not a valid TGA file?
A non-mapped image may contain a color map ;-0 it's simply
discarded.
As per your ideas
>return to!bool(isColorMapped(header)
> ? header.colorMapDepth.among(16, 32)
> : header.pixelDepth.among(16, 32));
this is not nothrow, but as you can see there is nothing that can
ever throw.. so perhaps I'll stick to the cast(bool) thing.. Any
idea?
More information about the Digitalmars-d-learn
mailing list