Homepage
search
ProductsShopNewsSupportCompany
English
Support

Contact
SheerVideo
PhotoJazz
English-Speaking Digital Film & Video User Groups

PhotoJazz

User Manual
Release Notes
Known Problems
Developer Support

Developer Support

SDK
Development FAQ
API Manual

API Manual

Overview
Foundation Layer
File Layer

File Layer

Parameters
Retrieving Parameter Values
Setting Parameter Values
Interpreting Private Chunks
Reading PhotoJazz Files
Writing PhotoJazz Files


PhotoJazz API Manual

File Layer
Setting Parameter Values


Similarly, for each PhotoJazz parameter, there is a corresponding JzSet function that sets the current value of that parameter for a specified PhotoJazz file. All of these functions take two arguments: a pointer to a PhotoJazz file, which the PhotoJazz engine gives you when you begin writing the file with JzWriteBegin, and the new value of the parameter being set. The JzSet functions cannot be called in the JzRead sequence; they can only be called in the JzWrite sequence.

JzStreamResult JzSetMode(JzFile *aJazzFile, JzMode aMode);

JzStreamResult JzSetWidth(JzFile *aJazzFile, unsigned long aWidth);
JzStreamResult JzSetHeight(JzFile *aJazzFile, unsigned long aHeight);

JzStreamResult JzSetPrimaryCount(JzFile *aJazzFile, unsigned char aPrimaryCount);
JzStreamResult JzSetSpotColorCount(JzFile *aJazzFile, unsigned char aSpotColorCount);
JzStreamResult JzSetOtherChannelCount(JzFile *aJazzFile, unsigned char aOtherChannelCount);

JzStreamResult JzSetDataType(JzFile *aJazzFile, JzDataType aDataType);
JzStreamResult JzSetUnitSample(JzFile *aJazzFile, unsigned long aUnitSample);

JzStreamResult JzSetSourceName(JzFile *aJazzFile, char *aSourceName);
JzStreamResult JzSetSourceCreator(JzFile *aJazzFile, unsigned long aSourceCreator);
JzStreamResult JzSetSourceType(JzFile *aJazzFile, unsigned long aSourceType);

JzStreamResult JzSetTileSize(JzFile *aJazzFile, unsigned short aTileSize);
JzStreamResult JzSetTileWidth(JzFile *aJazzFile, unsigned short aTileWidth);
JzStreamResult JzSetTileHeight(JzFile *aJazzFile, unsigned short aTileHeight);

JzStreamResult JzSetResolutionUnit(JzFile *aJazzFile, JzResolutionUnit aResolutionUnit);
JzStreamResult JzSetResolution(JzFile *aJazzFile, JzUnsignedRational aResolution);
JzStreamResult JzSetHorizontalResolution(JzFile *aJazzFile, JzUnsignedRational aHorizontalResolution);
JzStreamResult JzSetVerticalResolution(JzFile *aJazzFile, JzUnsignedRational aVerticalResolution);

JzStreamResult JzSetICCProfile(JzFile *aJazzFile, void *aICCProfile);

In addition, two summary functions have been provided for convenience: JzSetTileSize specifies both tile dimensions when the tiles are square and hence mTileWidth and mTileHeight are equal; and JzSetResolution sets both resolution dimensions when the pixels are square and hence mHorizontalResolution and mVerticalResolution are equal.

In JzSet functions that take a pointer as a value argument, such as JzSetSourceName and JzSetICCProfile, PhotoJazz makes its own copy, so you can free the original immediately afterwards.

All of these functions return a JzStreamResult to indicate either success (kJzStreamResultOkay) or some kind of error. If a JzSet function returns an error, you must still call JzWriteEnd to allow PhotoJazz to clean up properly.

If you are using the PhotoJazz interface correctly, the only error result the JzSet functions should return is kJzStreamResultOutOfMemory.

kJzStreamResultOutOfMemory, //not enough memory

The other result values always indicate errors in your use of the PhotoJazz interface. The result kJzStreamResultUnwritable means that you are trying to set parameters in a file that you opened for read access; kJzStreamResultUnimplemented could mean either that you are specifying an invalid argument (typically enum) value, or that your PhotoJazz engine needs to be updated to a newer version; kJzStreamResultMissingArgument indicates that you passed in a NULL pointer for a required argument; kJzStreamResultIncompleteArgument means that you failed to assign a pointer to one of the members of a required argument; kJzStreamResultInconsistentArgument means that the value of an argument you specified is inconsistent with the current state.

kJzStreamResultUnwritable, //no write access
kJzStreamResultUnimplemented, //get a new version of PhotoJazz
kJzStreamResultMissingArgument, //NULL address
kJzStreamResultIncompleteArgument, //NULL structure member
kJzStreamResultInconsistentArgument, //value inconsistent with state


previous pagenext page

Copyright © 1998..2011 BitJazz Inc. All rights reserved.
Site design by BitJazz Inc.