Cel Class Reference

The Cel JavaScript class. Adds file storage capabilities to cels. More...

Files

FileWrapper imageFile ()
 Get a permanent copy of cel image file. This function without parameters is valid only for ports that point to a physically valid file on disk. More...
 
FileWrapper imageFile (String &name)
 Get a permanent copy of cel image file of specific format. More...
 
FileWrapper imageFileAs (String &name, String &formatstring, String &optionstring)
 Get a permanent copy of cel image file of specific format. More...
 
FileWrapper workingCopy ()
 Get a temporary copy of cel image file. More...
 
FileWrapper workingCopyAs (String &ext, String &formatstring=String(), String &optionstring=String())
 Get a temporary copy of cel image file of specific format. More...
 
void setEmpty ()
 Set wrapped cel as empty. More...
 
QList< int > allocatedRect ()
 Retrieve allocated area of sparse image. Is equal to full area for non-sparse images. More...
 
QList< int > rect ()
 Retrieve full area of image. More...
 
bool isCel3D ()
 
bool convertColorSpace (String &fromColorSpace, String &toColorSpace)
 Convert cel colour space. More...
 

Detailed Description

The Cel JavaScript class. Adds file storage capabilities to cels.

A cel JavaScript object can be obtained by calling render::frameReady()

Member Function Documentation

◆ allocatedRect

QList<int> Cel::allocatedRect ( )
slot

Retrieve allocated area of sparse image. Is equal to full area for non-sparse images.

Returns
Allocated rect. 4-tuple (x1, y1, width, height).

◆ convertColorSpace

bool Cel::convertColorSpace ( String &  fromColorSpace,
String &  toColorSpace 
)
slot

Convert cel colour space.

Parameters
fromColorSpacethe name of the colour space to convert from.
toColorSpacethe name of the colour space to convert to.
Returns
True if success, false if specified colour space names are not supported.
See also
render class
function frameReady(frame, celImage)
{
MessageLog.trace("Frame " + frame + " Ready.");
celImage.convertColorSpace("Linear", "Rec.2020");
// Save the image
celImage.imageFile("c:/tmp/myimage" + frame + ".png");
}
render.frameReady.connect(frameReady);
render.setRenderDisplay("Top/Display");
render.frameReady.disconnect(frameReady);

◆ imageFile [1/2]

FileWrapper Cel::imageFile ( )
slot

Get a permanent copy of cel image file. This function without parameters is valid only for ports that point to a physically valid file on disk.

Returns
FileWrapper

◆ imageFile [2/2]

FileWrapper Cel::imageFile ( String &  name)
slot

Get a permanent copy of cel image file of specific format.

Parameters
nameName of file to create
Returns
FileWrapper

◆ imageFileAs

FileWrapper Cel::imageFileAs ( String &  name,
String &  formatstring,
String &  optionstring 
)
slot

Get a permanent copy of cel image file of specific format.

Parameters
nameName of file to create
formatstringFormat to convert image into
optionstringImage extension specific option (ie. TGA, TGA3, TGA4, SGIDP)
Returns
FileWrapper

◆ isCel3D

bool Cel::isCel3D ( )
slot

◆ rect

QList<int> Cel::rect ( )
slot

Retrieve full area of image.

Returns
Full rect. 4-tuple (x1, y1, width, height).

◆ setEmpty

void Cel::setEmpty ( )
slot

Set wrapped cel as empty.

◆ workingCopy

FileWrapper Cel::workingCopy ( )
slot

Get a temporary copy of cel image file.

Returns
FileWrapper

◆ workingCopyAs

FileWrapper Cel::workingCopyAs ( String &  ext,
String &  formatstring = String(),
String &  optionstring = String() 
)
slot

Get a temporary copy of cel image file of specific format.

Parameters
extExtension of image file to create
formatstringFormat to convert image into
optionstringImage extension specific option
Returns
FileWrapper