This commit is contained in:
itsmattkc
2020-04-02 13:02:53 +11:00
+5 -5
View File
@@ -2,11 +2,11 @@
Color::Color(const char *data, const PixelFormat::Format &format)
{
OIIO::convert_type(PixelFormat::GetOIIOTypeDesc(format),
data,
PixelFormat::GetOIIOTypeDesc(PixelFormat::PIX_FMT_RGB32F),
data_,
PixelFormat::FormatHasAlphaChannel(format) ? kRGBAChannels : kRGBChannels);
OIIO::convert_types(PixelFormat::GetOIIOTypeDesc(format),
data,
PixelFormat::GetOIIOTypeDesc(PixelFormat::PIX_FMT_RGB32F),
data_,
PixelFormat::FormatHasAlphaChannel(format) ? kRGBAChannels : kRGBChannels);
if (!PixelFormat::FormatHasAlphaChannel(format)) {
set_alpha(1.0f);