本文整理汇总了C++中ofx::ClipPreferencesSetter类的典型用法代码示例。如果您正苦于以下问题:C++ ClipPreferencesSetter类的具体用法?C++ ClipPreferencesSetter怎么用?C++ ClipPreferencesSetter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ClipPreferencesSetter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: getClipPreferences
void EXRReaderPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
ReaderPlugin::getClipPreferences( clipPreferences );
if( getExplicitChannelConversion() == eParamReaderChannelAuto )
{
switch( _channelNames.size() )
{
case 1:
{
if( OFX::getImageEffectHostDescription()->supportsPixelComponent( OFX::ePixelComponentAlpha ) )
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentAlpha );
break;
}
case 2:
case 3:
{
if( OFX::getImageEffectHostDescription()->supportsPixelComponent( OFX::ePixelComponentRGB ) )
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGB );
break;
}
default:
//case 4:
{
if( OFX::getImageEffectHostDescription()->supportsPixelComponent( OFX::ePixelComponentRGBA ) )
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
break;
}
}
}
clipPreferences.setPixelAspectRatio( *this->_clipDst, _par );
}
开发者ID:edubois,项目名称:TuttleOFX,代码行数:33,代码来源:EXRReaderPlugin.cpp
示例2: getClipPreferences
void RawReaderPlugin::getClipPreferences(OFX::ClipPreferencesSetter& clipPreferences)
{
ReaderPlugin::getClipPreferences(clipPreferences);
// const std::string filename( getAbsoluteFirstFilename() );
if(getExplicitBitDepthConversion() == eParamReaderBitDepthAuto)
{
OFX::EBitDepth bd = OFX::eBitDepthNone;
int bitDepth = 32; // raw_read_precision( filename );
switch(bitDepth)
{
case 8:
bd = OFX::eBitDepthUByte;
break;
case 16:
bd = OFX::eBitDepthUShort;
break;
case 32:
bd = OFX::eBitDepthFloat;
break;
default:
BOOST_THROW_EXCEPTION(exception::ImageFormat());
}
clipPreferences.setClipBitDepth(*this->_clipDst, bd);
}
clipPreferences.setClipComponents(*this->_clipDst, OFX::ePixelComponentRGBA);
clipPreferences.setPixelAspectRatio(*this->_clipDst, 1.0);
}
开发者ID:tuttleofx,项目名称:TuttleOFX,代码行数:27,代码来源:RawReaderPlugin.cpp
示例3: getClipPreferences
void ColorGradientPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
GeneratorPlugin::getClipPreferences( clipPreferences );
if( getExplicitConversion() == eParamGeneratorExplicitConversionAuto )
{
clipPreferences.setClipBitDepth( *_clipDst, OFX::eBitDepthFloat );
}
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
clipPreferences.setPixelAspectRatio( *this->_clipDst, 1.0 );
}
开发者ID:antdricot,项目名称:TuttleOFX,代码行数:11,代码来源:ColorGradientPlugin.cpp
示例4: getClipPreferences
void FFMpegReaderPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
clipPreferences.setOutputFrameVarying( true );
clipPreferences.setClipComponents( *_clipDst, OFX::ePixelComponentRGBA );
clipPreferences.setClipBitDepth( *_clipDst, OFX::eBitDepthUByte ); /// @todo tuttle: some video format may need other bit depth (how we can detect this ?)
if( !ensureVideoIsOpen() )
return;
// options depending on input file
clipPreferences.setPixelAspectRatio( *_clipDst, _reader.aspectRatio() );
clipPreferences.setOutputFrameRate( _reader.fps() );
// Setup fielding
switch( _reader.interlacment() )
{
case eInterlacmentNone:
{
clipPreferences.setOutputFielding( OFX::eFieldNone );
break;
}
case eInterlacmentUpper:
{
clipPreferences.setOutputFielding( OFX::eFieldUpper );
break;
}
case eInterlacmentLower:
{
clipPreferences.setOutputFielding( OFX::eFieldLower );
break;
}
}
}
开发者ID:morphimac,项目名称:TuttleOFX,代码行数:33,代码来源:FFMpegReaderPlugin.cpp
示例5: getClipPreferences
void ComponentPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
switch( _paramToComponent->getValue() )
{
case eConvertToGray:
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentAlpha );
break;
case eConvertToRGB:
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGB );
break;
case eConvertToRGBA:
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
break;
}
}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:15,代码来源:ComponentPlugin.cpp
示例6: getClipPreferences
void BitDepthPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
if( _paramOutBitDepth->getValue() != 0 )
{
clipPreferences.setClipBitDepth( *_clipDst, static_cast<OFX::EBitDepth>( _paramOutBitDepth->getValue() ) );
}
}
开发者ID:antdricot,项目名称:TuttleOFX,代码行数:7,代码来源:BitDepthPlugin.cpp
示例7:
void
TestOpenGLPlugin::getClipPreferences(OFX::ClipPreferencesSetter &clipPreferences)
{
// We have to do this because the processing code does not support varying components for srcClip and dstClip
// (The OFX spec doesn't state a default value for this)
clipPreferences.setClipComponents(*_dstClip, _srcClip->getPixelComponents());
}
开发者ID:lidas123,项目名称:openfx-misc,代码行数:7,代码来源:TestOpenGL.cpp
示例8: getClipPreferences
void SobelPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
EParamOutputComponent comp = static_cast<EParamOutputComponent>(_paramOutputComponent->getValue());
switch( comp )
{
case eParamOutputComponentRGBA:
{
clipPreferences.setClipComponents( *_clipDst, OFX::ePixelComponentRGBA );
break;
}
case eParamOutputComponentRGB:
{
clipPreferences.setClipComponents( *_clipDst, OFX::ePixelComponentRGB );
break;
}
}
}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:17,代码来源:SobelPlugin.cpp
示例9: getClipPreferences
void ReaderPlugin::getClipPreferences(OFX::ClipPreferencesSetter& clipPreferences)
{
// If pattern detected (frame varying on time)
clipPreferences.setOutputFrameVarying(varyOnTime());
switch(getExplicitBitDepthConversion())
{
case eParamReaderBitDepthByte:
{
clipPreferences.setClipBitDepth(*this->_clipDst, OFX::eBitDepthUByte);
break;
}
case eParamReaderBitDepthShort:
{
clipPreferences.setClipBitDepth(*this->_clipDst, OFX::eBitDepthUShort);
break;
}
case eParamReaderBitDepthAuto:
case eParamReaderBitDepthFloat:
{
clipPreferences.setClipBitDepth(*this->_clipDst, OFX::eBitDepthFloat);
break;
}
}
switch(getExplicitChannelConversion())
{
case eParamReaderChannelGray:
{
clipPreferences.setClipComponents(*this->_clipDst, OFX::ePixelComponentAlpha);
break;
}
case eParamReaderChannelRGB:
{
if(OFX::getImageEffectHostDescription()->supportsPixelComponent(OFX::ePixelComponentRGB))
clipPreferences.setClipComponents(*this->_clipDst, OFX::ePixelComponentRGB);
else
clipPreferences.setClipComponents(*this->_clipDst, OFX::ePixelComponentRGBA);
break;
}
case eParamReaderChannelAuto:
case eParamReaderChannelRGBA:
{
clipPreferences.setClipComponents(*this->_clipDst, OFX::ePixelComponentRGBA);
break;
}
}
clipPreferences.setPixelAspectRatio(*this->_clipDst, 1.0);
}
开发者ID:aoblet,项目名称:TuttleOFX,代码行数:49,代码来源:ReaderPlugin.cpp
示例10: getClipPreferences
void DPXReaderPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
ReaderPlugin::getClipPreferences( clipPreferences );
const std::string filename( getAbsoluteFirstFilename() );
if( getExplicitConversion() == eParamReaderExplicitConversionAuto )
{
DpxImage dpxImg;
dpxImg.readHeader( filename );
OFX::EBitDepth bd = OFX::eBitDepthNone;
switch( dpxImg.componentsType() )
{
case DpxImage::eCompTypeR8G8B8:
case DpxImage::eCompTypeR8G8B8A8:
case DpxImage::eCompTypeA8B8G8R8:
{
bd = OFX::eBitDepthUByte;
break;
}
case DpxImage::eCompTypeR10G10B10:
case DpxImage::eCompTypeR10G10B10A10:
case DpxImage::eCompTypeA10B10G10R10:
case DpxImage::eCompTypeR12G12B12:
case DpxImage::eCompTypeR12G12B12A12:
case DpxImage::eCompTypeA12B12G12R12:
case DpxImage::eCompTypeR16G16B16:
case DpxImage::eCompTypeR16G16B16A16:
case DpxImage::eCompTypeA16B16G16R16:
{
bd = OFX::eBitDepthUShort;
break;
}
default:
bd = OFX::eBitDepthFloat;
}
clipPreferences.setClipBitDepth( *_clipDst, bd );
}
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
clipPreferences.setPixelAspectRatio( *this->_clipDst, 1.0 );
}
开发者ID:antdricot,项目名称:TuttleOFX,代码行数:42,代码来源:DPXReaderPlugin.cpp
示例11: getClipPreferences
void PngReaderPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
ReaderPlugin::getClipPreferences( clipPreferences );
const std::string filename( getAbsoluteFirstFilename() );
if( getExplicitBitDepthConversion() == eParamReaderBitDepthAuto )
{
OFX::EBitDepth bd = OFX::eBitDepthNone;
if( ! boost::filesystem::exists( filename ) )
{
BOOST_THROW_EXCEPTION( exception::FileNotExist()
<< exception::user( "PNG: Unable to open file" )
<< exception::filename( filename ) );
}
int bitDepth;
bitDepth = png_read_precision( filename );
switch( bitDepth )
{
case 8:
bd = OFX::eBitDepthUByte;
break;
case 16:
bd = OFX::eBitDepthUShort;
break;
default:
BOOST_THROW_EXCEPTION( exception::ImageFormat() );
}
clipPreferences.setClipBitDepth( *this->_clipDst, bd );
}
if( getExplicitChannelConversion() == eParamReaderChannelAuto )
{
switch( png_read_color_type( filename ) )
{
case 0 :
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentAlpha );
break;
case 2 :
if( OFX::getImageEffectHostDescription()->supportsPixelComponent( OFX::ePixelComponentRGB ) )
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGB );
else
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
break;
case 6 :
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
break;
default:
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
break;
}
}
clipPreferences.setPixelAspectRatio( *this->_clipDst, 1.0 );
}
开发者ID:edubois,项目名称:TuttleOFX,代码行数:56,代码来源:PngReaderPlugin.cpp
示例12: getClipPreferences
void EXRReaderPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
ReaderPlugin::getClipPreferences( clipPreferences );
if( getExplicitChannelConversion() == eParamReaderChannelAuto )
{
switch( _channels )
{
case 1:
{
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentAlpha );
break;
}
case 3:
{
if( OFX::getImageEffectHostDescription()->supportsPixelComponent( OFX::ePixelComponentRGB ) )
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGB );
else
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
break;
}
case 4:
{
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
break;
}
default:
{
std::string msg = "EXR: not support ";
msg += _channels;
msg += " channels.";
BOOST_THROW_EXCEPTION( exception::FileNotExist()
<< exception::user( msg ) );
break;
}
}
}
clipPreferences.setPixelAspectRatio( *this->_clipDst, 1.0 ); /// @todo tuttle: retrieve info from exr
}
开发者ID:DIT-Tools,项目名称:TuttleOFX,代码行数:40,代码来源:EXRReaderPlugin.cpp
示例13: getClipPreferences
void GeneratorPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
clipPreferences.setOutputFrameVarying( true );
switch( getExplicitConversion() )
{
case eParamGeneratorExplicitConversionByte:
{
clipPreferences.setClipBitDepth( *this->_clipDst, OFX::eBitDepthUByte );
break;
}
case eParamGeneratorExplicitConversionShort:
{
clipPreferences.setClipBitDepth( *this->_clipDst, OFX::eBitDepthUShort );
break;
}
case eParamGeneratorExplicitConversionAuto:
case eParamGeneratorExplicitConversionFloat:
{
clipPreferences.setClipBitDepth( *this->_clipDst, OFX::eBitDepthFloat );
break;
}
}
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
clipPreferences.setPixelAspectRatio( *this->_clipDst, 1.0 );
}
开发者ID:antdricot,项目名称:TuttleOFX,代码行数:26,代码来源:GeneratorPlugin.cpp
示例14: getClipPreferences
void ReaderPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
const std::string filename( getAbsoluteFirstFilename() );
if( !bfs::exists( filename ) )
{
BOOST_THROW_EXCEPTION( exception::File()
<< exception::user( "Unable to open file." )
<< exception::filename( filename ) );
BOOST_THROW_EXCEPTION( exception::FileNotExist( filename ) );
}
// If pattern detected (frame varying on time)
clipPreferences.setOutputFrameVarying( varyOnTime() );
switch( getExplicitConversion() )
{
case eParamReaderExplicitConversionByte:
{
clipPreferences.setClipBitDepth( *this->_clipDst, OFX::eBitDepthUByte );
break;
}
case eParamReaderExplicitConversionShort:
{
clipPreferences.setClipBitDepth( *this->_clipDst, OFX::eBitDepthUShort );
break;
}
case eParamReaderExplicitConversionAuto:
case eParamReaderExplicitConversionFloat:
{
clipPreferences.setClipBitDepth( *this->_clipDst, OFX::eBitDepthFloat );
break;
}
}
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
clipPreferences.setPixelAspectRatio( *this->_clipDst, 1.0 );
}
开发者ID:antdricot,项目名称:TuttleOFX,代码行数:35,代码来源:ReaderPlugin.cpp
示例15: getClipPreferences
void TurboJpegReaderPlugin::getClipPreferences(OFX::ClipPreferencesSetter& clipPreferences)
{
ReaderPlugin::getClipPreferences(clipPreferences);
if(getExplicitBitDepthConversion() == eParamReaderBitDepthAuto)
{
clipPreferences.setClipBitDepth(*this->_clipDst, OFX::eBitDepthUByte);
}
if(getExplicitChannelConversion() == eParamReaderChannelAuto)
{
if(OFX::getImageEffectHostDescription()->supportsPixelComponent(OFX::ePixelComponentRGB))
{
clipPreferences.setClipComponents(*this->_clipDst, OFX::ePixelComponentRGB);
}
else
{
clipPreferences.setClipComponents(*this->_clipDst, OFX::ePixelComponentRGBA);
}
}
clipPreferences.setPixelAspectRatio(*this->_clipDst, 1.0);
}
开发者ID:aoblet,项目名称:TuttleOFX,代码行数:23,代码来源:TurboJpegReaderPlugin.cpp
示例16: getClipPreferences
void ImageMagickReaderPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
ReaderPlugin::getClipPreferences( clipPreferences );
const std::string filename = getAbsoluteFirstFilename();
ImageInfo* imageInfo = AcquireImageInfo();
GetImageInfo( imageInfo );
strcpy( imageInfo->filename, filename.c_str() );
ExceptionInfo* exceptionsInfo = AcquireExceptionInfo();
GetExceptionInfo( exceptionsInfo );
Image* image = PingImage( imageInfo, exceptionsInfo );
if( getExplicitConversion() == eParamReaderExplicitConversionAuto )
{
clipPreferences.setClipBitDepth( *this->_clipDst, OFX::eBitDepthFloat ); // by default
if( image )
{
unsigned long bitDepth = GetImageDepth( image, exceptionsInfo ); // if image information use it
if( bitDepth <= 8 )
{
clipPreferences.setClipBitDepth( *this->_clipDst, OFX::eBitDepthUByte );
}
else if( bitDepth <= 16 )
{
clipPreferences.setClipBitDepth( *this->_clipDst, OFX::eBitDepthUShort );
}
}
}
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA ); /// @todo tuttle: retrieve info, gray / RGB / RGBA...
clipPreferences.setPixelAspectRatio( *this->_clipDst, 1.0 ); /// @todo tuttle: retrieve info
if( image )
image = DestroyImage( image );
imageInfo = DestroyImageInfo( imageInfo );
exceptionsInfo = DestroyExceptionInfo( exceptionsInfo );
}
开发者ID:antdricot,项目名称:TuttleOFX,代码行数:37,代码来源:ImageMagickReaderPlugin.cpp
示例17: getClipPreferences
void InputBufferPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
OfxRangeD range;
_paramTimeDomain->getValue( range.min, range.max );
InputBufferProcessParams params = getProcessParams( range.min );
clipPreferences.setOutputFrameVarying( params._mode == eParamInputModeCallbackPointer );
clipPreferences.setClipComponents( *_clipDst, params._pixelComponents );
clipPreferences.setClipBitDepth( *_clipDst, params._bitDepth );
clipPreferences.setPixelAspectRatio( *_clipDst, params._pixelAspectRatio );
clipPreferences.setOutputFrameRate( params._framerate );
clipPreferences.setOutputFielding( params._field );
}
开发者ID:MrKepzie,项目名称:TuttleOFX,代码行数:13,代码来源:InputBufferPlugin.cpp
示例18: retrieveFileInfo
void Jpeg2000ReaderPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
// TUTTLE_LOG_VAR( TUTTLE_INFO, _paramFilepath->getValue() );
// TUTTLE_LOG_VAR( TUTTLE_INFO, getAbsoluteFirstFilename() );
// TUTTLE_LOG_VAR( TUTTLE_INFO, getFirstTime() );
// TUTTLE_LOG_VAR( TUTTLE_INFO, getAbsoluteFilenameAt(getFirstTime()) );
ReaderPlugin::getClipPreferences( clipPreferences );
FileInfo fileInfo = retrieveFileInfo( getFirstTime() );
if ( fileInfo._failed )
{
BOOST_THROW_EXCEPTION( exception::Failed()
<< exception::user( "Jpeg2000: Unable to read file infos." ) );
}
if( getExplicitBitDepthConversion() == eParamReaderBitDepthAuto )
{
clipPreferences.setClipBitDepth( *_clipDst, fileInfo._precisionType );
}
else // if we explicitly specify which conversion we want
{
clipPreferences.setClipBitDepth( *_clipDst, getOfxExplicitConversion() );
}
if( getExplicitChannelConversion() == eParamReaderChannelAuto )
{
switch( fileInfo._components )
{
case 1:
clipPreferences.setClipComponents( *_clipDst, OFX::ePixelComponentAlpha );
break;
case 3:
clipPreferences.setClipComponents( *_clipDst, OFX::ePixelComponentRGB );
break;
case 4:
clipPreferences.setClipComponents( *_clipDst, OFX::ePixelComponentRGBA );
break;
default:
{
BOOST_THROW_EXCEPTION( exception::ImageFormat()
<< exception::user() + "Jpeg2000: Unexpected number of channels (" + fileInfo._components + ")" );
}
}
}
clipPreferences.setPixelAspectRatio( *_clipDst, 1.0 );
}
开发者ID:Achammem,项目名称:TuttleOFX,代码行数:48,代码来源:Jpeg2000ReaderPlugin.cpp
示例19: getClipPreferences
void WriterPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
// If pattern detected (frame varying on time)
clipPreferences.setOutputFrameVarying( varyOnTime() );
}
开发者ID:morphimac,项目名称:TuttleOFX,代码行数:5,代码来源:WriterPlugin.cpp
示例20: getClipPreferences
void OpenImageIOReaderPlugin::getClipPreferences( OFX::ClipPreferencesSetter& clipPreferences )
{
ReaderPlugin::getClipPreferences( clipPreferences );
const std::string filename( getAbsoluteFirstFilename() );
// if no filename
if( filename.size() == 0 )
{
clipPreferences.setClipBitDepth( *this->_clipDst, OFX::eBitDepthFloat );
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
clipPreferences.setPixelAspectRatio( *this->_clipDst, 1.0 );
return;
}
OpenImageIO::ImageInput *in = OpenImageIO::ImageInput::create( filename );
if( !in )
{
BOOST_THROW_EXCEPTION( exception::Unknown()
<< exception::user( "OIIO Reader: " + in->geterror () )
<< exception::filename( filename ) );
}
OpenImageIO::ImageSpec spec;
if( ! in->open( filename, spec ) )
{
BOOST_THROW_EXCEPTION( exception::Unknown()
<< exception::user( "OIIO Reader: " + in->geterror () )
<< exception::filename( filename ) );
}
if( getExplicitBitDepthConversion() == eParamReaderBitDepthAuto )
{
OFX::EBitDepth bd = OFX::eBitDepthNone;
switch( spec.format.basetype )
{
// case TypeDesc::UCHAR:
case OpenImageIO::TypeDesc::UINT8:
// case TypeDesc::CHAR:
case OpenImageIO::TypeDesc::INT8:
bd = OFX::eBitDepthUByte;
break;
case OpenImageIO::TypeDesc::HALF:
// case TypeDesc::USHORT:
case OpenImageIO::TypeDesc::UINT16:
// case TypeDesc::SHORT:
case OpenImageIO::TypeDesc::INT16:
bd = OFX::eBitDepthUShort;
break;
// case TypeDesc::UINT:
case OpenImageIO::TypeDesc::UINT32:
// case TypeDesc::INT:
case OpenImageIO::TypeDesc::INT32:
// case TypeDesc::ULONGLONG:
case OpenImageIO::TypeDesc::UINT64:
// case TypeDesc::LONGLONG:
case OpenImageIO::TypeDesc::INT64:
case OpenImageIO::TypeDesc::FLOAT:
case OpenImageIO::TypeDesc::DOUBLE:
bd = OFX::eBitDepthFloat;
break;
case OpenImageIO::TypeDesc::STRING:
case OpenImageIO::TypeDesc::PTR:
case OpenImageIO::TypeDesc::LASTBASE:
case OpenImageIO::TypeDesc::UNKNOWN:
case OpenImageIO::TypeDesc::NONE:
default:
{
in->close();
BOOST_THROW_EXCEPTION( exception::ImageFormat()
<< exception::user("bad input format") );
}
}
clipPreferences.setClipBitDepth( *this->_clipDst, bd );
}
if( getExplicitChannelConversion() == eParamReaderChannelAuto )
{
switch( spec.nchannels )
{
case 1 :
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentAlpha );
break;
case 3 :
if( OFX::getImageEffectHostDescription()->supportsPixelComponent( OFX::ePixelComponentRGB ) )
{
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGB );
}
else
{
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
}
break;
case 4 :
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
break;
default:
clipPreferences.setClipComponents( *this->_clipDst, OFX::ePixelComponentRGBA );
break;
//.........这里部分代码省略.........
开发者ID:DIT-Tools,项目名称:TuttleOFX,代码行数:101,代码来源:OpenImageIOReaderPlugin.cpp
注:本文中的ofx::ClipPreferencesSetter类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论