![]() |
File LayerSetting 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.
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
|