pixelsampler: added pixel sampler panel
When visible, this panel will show the current reference and display transformed color under the cursor of any viewer.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include "color.h"
|
||||
|
||||
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);
|
||||
|
||||
if (!PixelFormat::FormatHasAlphaChannel(format)) {
|
||||
set_alpha(1.0f);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user