DPX Image Writer class. More...
#include <DPX.h>
Public Member Functions | |
Writer () | |
Constructor. | |
virtual | ~Writer () |
Destructor. | |
void | Start () |
Start defining the header and writing the images. | |
void | SetFileInfo (const char *fileName, const char *creationTimeDate=0, const char *creator=0, const char *project=0, const char *copyright=0, const U32 encryptKey=~0) |
Set the basic file information about DPX. | |
void | SetImageInfo (const U32 width, const U32 height) |
Set the Width and Height of the images. | |
int | NextAvailElement () const |
Get the next available element. | |
void | SetElement (const int element=0, const Descriptor desc=kRGB, const U8 bitDepth=10, const Characteristic transfer=kLogarithmic, const Characteristic colorimetric=kLogarithmic, const Packing packing=kFilledMethodA, const Encoding encoding=kNone, const U32 dataSign=0, const U32 lowData=~0, const R32 lowQuantity=~0, const U32 highData=~0, const R32 highQuantity=~0, const U32 eolnPadding=0, const U32 eoimPadding=0) |
Set the parameters on an element. | |
void | SetOutStream (OutStream *stream) |
Set the OutStream object will use to write the files. | |
void | SetUserData (const long size) |
Set the size of the user data area. | |
bool | WriteHeader () |
Write the header. | |
bool | WriteUserData (void *data) |
Write the user data. | |
bool | WriteElement (const int element, void *data) |
Write the entire element to the dpx file. | |
bool | WriteElement (const int element, void *data, const DataSize size) |
bool | WriteElement (const int element, void *data, const long count) |
bool | Finish () |
Finish up writing image. | |
Public Attributes | |
Header | header |
DPX Header. | |
Protected Member Functions | |
bool | WriteThrough (void *, const U32, const U32, const int, const int, const U32, const U32, char *) |
Protected Attributes | |
long | fileLoc |
OutStream * | fd |
DPX Image Writer class.
dpx::Writer::Writer | ( | ) |
Constructor.
dpx::Writer::~Writer | ( | ) | [virtual] |
Destructor.
bool dpx::Writer::Finish | ( | ) |
Finish up writing image.
int dpx::Writer::NextAvailElement | ( | ) | const |
Get the next available element.
void dpx::Writer::SetElement | ( | const int | element = 0 , |
|
const Descriptor | desc = kRGB , |
|||
const U8 | bitDepth = 10 , |
|||
const Characteristic | transfer = kLogarithmic , |
|||
const Characteristic | colorimetric = kLogarithmic , |
|||
const Packing | packing = kFilledMethodA , |
|||
const Encoding | encoding = kNone , |
|||
const U32 | dataSign = 0 , |
|||
const U32 | lowData = ~0 , |
|||
const R32 | lowQuantity = ~0 , |
|||
const U32 | highData = ~0 , |
|||
const R32 | highQuantity = ~0 , |
|||
const U32 | eolnPadding = 0 , |
|||
const U32 | eoimPadding = 0 | |||
) |
Set the parameters on an element.
There are 8 elements maximum in an single DPX and each element used must be set before writing the header
element | element number (0-7) | |
desc | image descriptor | |
bitDepth | bit depth of image, valid values are [8,10,12,16,32,64] | |
transfer | transfer characteristic | |
colorimetric | colorimetric specification | |
packing | packing type | |
encoding | encoding type | |
dataSign | ||
lowData | ||
lowQuantity | ||
highData | ||
highQuantity | ||
eolnPadding | end of line padding (in bytes) | |
eoimPadding | end of image padding (in bytes) |
void dpx::Writer::SetFileInfo | ( | const char * | fileName, | |
const char * | creationTimeDate = 0 , |
|||
const char * | creator = 0 , |
|||
const char * | project = 0 , |
|||
const char * | copyright = 0 , |
|||
const U32 | encryptKey = ~0 | |||
) |
Set the basic file information about DPX.
fileName | name of this created file (100 characters max) | |
creationTimeDate | creation time and date - format is "YYYY:MM:DD:HH:MM:SSLTZ" where HH is 24 hour time, LTZ is local time zone using either three character notation (i.e., -04) or five character notation representing hours and minutes offset from Greenwich Mean time (i.e., -0700) (24 characters max) | |
creator | creator (100 characters max) | |
project | project name (200 characters max) | |
copyright | copyright statement (200 characters max) | |
encryptKey | encryption key |
Set the Width and Height of the images.
width | width of the image | |
height | height of the image |
void dpx::Writer::SetOutStream | ( | OutStream * | stream | ) |
void dpx::Writer::SetUserData | ( | const long | size | ) |
Set the size of the user data area.
size | size of user data |
void dpx::Writer::Start | ( | ) |
Start defining the header and writing the images.
bool dpx::Writer::WriteElement | ( | const int | element, | |
void * | data, | |||
const long | count | |||
) |
bool dpx::Writer::WriteElement | ( | const int | element, | |
void * | data, | |||
const DataSize | size | |||
) |
bool dpx::Writer::WriteElement | ( | const int | element, | |
void * | data | |||
) |
Write the entire element to the dpx file.
element | element number (0-7) | |
data | buffer |
bool dpx::Writer::WriteHeader | ( | ) |
Write the header.
bool dpx::Writer::WriteThrough | ( | void * | data, | |
const U32 | width, | |||
const U32 | height, | |||
const int | noc, | |||
const int | bytes, | |||
const U32 | eolnPad, | |||
const U32 | eoimPad, | |||
char * | blank | |||
) | [protected] |
bool dpx::Writer::WriteUserData | ( | void * | data | ) |
Write the user data.
data | buffer - must match size set in Writer::SetUserData() |
OutStream* dpx::Writer::fd [protected] |
long dpx::Writer::fileLoc [protected] |