else if(conv.get()=="LUMINANCE_ALPHA")
comp = LUMINANCE_ALPHA;
else
- throw lexical_error(format("conversion of '%s' to PixelFormat", conv.get()));
+ throw lexical_error(format("conversion of '%s' to PixelComponents", conv.get()));
}
void operator>>(const LexicalConverter &conv, PixelFormat &fmt)
fmt = DEPTH_COMPONENT32F;
else
{
- PixelComponents comp;
- conv >> comp;
- fmt = make_pixelformat(comp, (comp==DEPTH_COMPONENT ? FLOAT : UNSIGNED_BYTE));
+ if(conv.get()=="SRGB")
+ fmt = SRGB8;
+ else if(conv.get()=="SRGB_ALPHA")
+ fmt = SRGB8_ALPHA8;
+ else
+ {
+ PixelComponents comp;
+ conv >> comp;
+ fmt = make_pixelformat(comp, (comp==DEPTH_COMPONENT ? FLOAT : UNSIGNED_BYTE));
+ }
IO::print(IO::cerr, "Warning: deprecated conversion of '%s' to PixelFormat\n", conv.get());
}
}