An ImageClip2 object is an instance of an image Source and is used as the container for applying composited image effects.
You can get the Source object corresponding to the ImageClip2 using Clip::Source. Applications never create image clips explicitly. Instead, they are created by calling the AddImageClip command.
using namespace XSI; Application app; CString strImagePath = app.GetInstallationPath(siFactoryPath) ; strImagePath += L"Data/XSI_SAMPLES/Pictures/circlelight3.tga" ; CValueArray args(1); CValue valImageClip2; args[0] = strImagePath ; app.ExecuteCommand( L"CreateImageClip", args, valImageClip2 ); ImageClip2 clip( valImageClip2 ); //retreiving the image source Source clipSource(clip.GetSource()); CValue fileName = clipSource.GetParameterValue( L"path"); CValue XRes = clipSource.GetParameterValue( L"XRes"); CValue YRes = clipSource.GetParameterValue( L"YRes"); app.LogMessage(L"The image file is : " + fileName.GetAsText()); app.LogMessage(L"The image x resolution is : " + XRes.GetAsText()); app.LogMessage(L"The image y resolution is : " + YRes.GetAsText());
#include <xsi_imageclip2.h>
Public Member Functions | |
ImageClip2 () | |
~ImageClip2 () | |
ImageClip2 (const CRef &in_ref) | |
ImageClip2 (const ImageClip2 &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
ImageClip2 & | operator= (const ImageClip2 &in_obj) |
ImageClip2 & | operator= (const CRef &in_ref) |
Image | GetImage (double in_dblFrame=DBL_MAX) |
Image | GetScaledDownImage (LONG in_Ratio, double in_dblFrame=DBL_MAX) |
CString | GetFileName (double in_dblFrame) |
CRefArray | GetShaderParameterTargets () const |
HardwareSurface | GetHardwareSurface (HardwareSurface::Options &in_options) const |
ImageClip2 | ( | ) |
Default constructor.
~ImageClip2 | ( | ) |
Default destructor.
ImageClip2 | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | constant reference object. |
ImageClip2 | ( | const ImageClip2 & | in_obj | ) |
Copy constructor.
in_obj | constant class object. |
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from Clip.
siClassID GetClassID | ( | ) | const [virtual] |
ImageClip2& operator= | ( | const ImageClip2 & | in_obj | ) |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
ImageClip2& operator= | ( | const CRef & | in_ref | ) |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
in_ref | constant class object. |
Reimplemented from Clip.
Image GetImage | ( | double | in_dblFrame = DBL_MAX | ) |
Provides access to the image data.
in_dblFrame | This optional argument permits retrieval of any frame within an image sequence or movie file. If not specified, the frame pulled is the frame corresponding to the current play position at the time the ImageClip2 object was instantiated. |
Image GetScaledDownImage | ( | LONG | in_Ratio, |
double | in_dblFrame = DBL_MAX |
||
) |
Returns a smaller version of the Image. For circumstances where the full resolution of an image is not necessary, you can improve performance by requesting a reduced image. If you are only generating a thumbnail it is overkill to read millions of pixels from a film resolution image.
preferences.rendering.maximum_proxy_level
and preferences.rendering.minimum_proxy_size
can influence the results of this call. The image returned may be larger than requested.in_Ratio | Requested ratio for reduction. Based on the siImageRatio enum. |
in_dblFrame | This optional argument permits retrieval of any frame within an image sequence or movie file. If not specified, the frame pulled is the frame corresponding to the current play position at the time the ImageClip2 object was instantiated. |
CString GetFileName | ( | double | in_dblFrame | ) |
Returns the image file name for this clip.
in_dblFrame | This optional argument permits retrieval of any frame within an image sequence or movie file. If not specified, the frame pulled is the frame corresponding to the current play position at the time the ImageClip2 object was instantiated. |
CRefArray GetShaderParameterTargets | ( | ) | const |
Returns the shader input parameters connected to the image clip.
HardwareSurface GetHardwareSurface | ( | HardwareSurface::Options & | in_options | ) | const |
Returns a hardware surface version of this image clip