![]() |
Foundation LayerBasic Data Types The basic derived data types used in the PhotoJazz interface are defined in the Foundation-layer interface file JzTypes.h. All PhotoJazz data types are based on integer elemental data types; PhotoJazz does not make use of any floating-point data types. For clarification, the elemental ANSI-C data types used by PhotoJazz are:
The basic derived data types in the PhotoJazz interface are:
A PhotoJazz file is opened either for reading or for writing. The corresponding access mode of an open PhotoJazz file can be retrieved with JzGetAccess. typedef enum JzAccessValue { If a PhotoJazz file was opened with JzReadBegin, its access mode is read-only. If a PhotoJazz file was opened with JzWriteBegin, its access mode is write-only. The PhotoJazz engine is unlocked to varying degrees by a pair of 64-bit keys supplied by BitJazz Inc.: a user key and a product key. typedef unsigned long long JzKey; The PhotoJazz engine accesses the user key outside the programming interface. You pass the product key in each time you start reading or writing a PhotoJazz file with JzReadBegin or JzWriteBegin. Initially, the product key you use is the default key, kJzWatermarkProduct, which watermarks all PhotoJazz files your product writes. When your product reaches the stage where you need to test without watermarking, you contact us for a product-specific key. You must use the key BitJazz assigns for your product. Under the basic arrangement, users of your product purchase the PhotoJazz engine from BitJazz Inc., and we charge no fee for the product key. If you want to bundle PhotoJazz with your product, contact us. The PhotoJazz interface makes a fundamental distinction between light and ink which other image file types generally make in inconsistent ways. typedef enum JzModeValue { The emissive colors of light, as from a display monitor, are purely additive: Take some red light, mix it with some green light, and you get a lighter yellow light with exactly as much red and green light as you put into it. So-called RGB (Red,Green,Blue) images are almost always kJzModeLight images, although occasionally artists will create pigment images with red, green, and blue primaries. The absorptive colors of ink, as on a printed page, are mainly subtractive: Take some red pigment (which absorbs non-red light and reflects red light), and mix it with some green pigment (which absorbs non-green light and reflects green), and you get a darker brown pigment that absorbs almost all light, reflecting only a little red and green. So-called CMY (Cyan/Magenta/Yellow) images are essentially always kJzModeInk images, and CMYK (Cyan/Magenta/Yellow/Black) images always are. Ink images are also commonly known by the name of Separations, because in high-volume (offset) printing, the different primaries are actually printed by separate plates. With monochrome images, unfortunately, most applications are confused about the distinction between light and ink. At the other extreme, light images with more than 3 primaries are commonly called multispectral, whereas ink images with more than 3 or 4 primaries are commonly called polychrome or high-fidelity. The inks used in printing have a very small range of noticeably different densities in comparison to the range of typical light displays or the human visual system. To compensate for this, printers often use different inks for different, possibly overlapping, density ranges. This technique, depending on the number of inks used, is called duotone, tritone, or quadtone (as opposed to monotone). The difference between this and ordinary multi-ink images is that the densities of the inks are completely interdependent, so that the mixture at each pixel is specified by a single number. That is, a kJzModeMultitone image only has one primary channel. Light intensities and ink densities are device-dependent color descriptions. Often it is convenient to have a device-independent description. The L*a*b* color space, proposed by the Commission Internationale d'Éclairage, is a device-independent color space which closely approximates human perception, so that colors equidistant in L*a*b* space appear equally different to human viewers. The L* component is the luminance, or lightness, while the other two are unfortunately highly unintuitive opponent-color chromaticity axes, a* ranging from green to red, and b* ranging from blue to yellow.BitJazz Inc. may add other modes in the future. Rather than inventing our own way of specifying any more-detailed information about the colors, the PhotoJazz interface uses ICC profiles, specified by the International Color Consortium, for this purpose. Horizontal and vertical resolution are generally expressed in pixels per centimeter. In a single fossiliferous country, the United States of America, people often use the ancient measure called an inch instead. BitJazz Inc. may add other units in the future. typedef enum JzResolutionUnitValue { For resolutions and other quantities for which integers are insufficient, PhotoJazz uses rational numbers, ratios between two integers. We provide utility functions, FixedToRational and RationalToFixed, to interconvert between rationals and fixed-point numbers. typedef struct JzUnsignedRational { The data type of the individual pixel components can currently be either an unsigned 8-bit (byte) integer or an unsigned 16-bit (short) integer. Unsigned integers using less than 8 bits or between 8 and 16 bits are indicated with the mUnitSample parameter. BitJazz Inc. may add support for other data types. typedef enum JzDataTypeValue { The function prototypes in the PhotoJazz interface are prefixed with the identifier JzLinkage so that compilers know which symbols to export from the PhotoJazz engine. For your purposes, JzLinkage is equivalent to extern. #define JzLinkage extern For convenience, 8-bit unsigned integer image samples are referred to by the type JzSampleU8, which is just an unsigned char. typdef unsigned char JzSampleU8; For convenience, 16-bit unsigned integer image samples are referred to by the type JzSampleU16, which is just an unsigned short. typdef unsigned short JzSampleU16;
|