Main namespace enclosing most OpenImageIO functionality. More...
Classes | |
class | ErrorHandler |
class | ImageBuf |
class | ImageCache |
class | QuantizationSpec |
class | ImageSpec |
class | ImageInput |
class | ImageOutput |
class | TextureOptions |
class | TextureSystem |
Typedefs | |
typedef ptrdiff_t | stride_t |
typedef unsigned long long | imagesize_t |
typedef bool(* | ProgressCallback )(void *opaque_data, float portion_done) |
typedef ParamValue | ImageIOParameter |
typedef ParamValueList | ImageIOParameterList |
typedef ImageSpec | ImageIOFormatSpec |
typedef unsigned char | Runflag |
Enumerations | |
enum | RunFlagVal { RunFlagOff = 0, RunFlagOn = 255 } |
Functions | |
DLLPUBLIC int | openimageio_version () |
DLLPUBLIC std::string | geterror () |
std::string | error_message () |
DLLPUBLIC int | quantize (float value, int quant_black, int quant_white, int quant_min, int quant_max, float quant_dither) |
float | exposure (float value, float gain, float invgamma) |
DLLPUBLIC bool | convert_types (TypeDesc src_type, const void *src, TypeDesc dst_type, void *to, int n, float gain=1, float gamma=1) |
DLLPUBLIC bool | convert_image (int nchannels, int width, int height, int depth, const void *src, TypeDesc src_type, stride_t src_xstride, stride_t src_ystride, stride_t src_zstride, void *dst, TypeDesc dst_type, stride_t dst_xstride, stride_t dst_ystride, stride_t dst_zstride, float gain=1, float gamma=1) |
DLLPUBLIC bool | decode_iptc_iim (const void *exif, int length, ImageSpec &spec) |
DLLPUBLIC void | encode_iptc_iim (const ImageSpec &spec, std::vector< char > &iptc) |
DLLPUBLIC bool | decode_xmp (const std::string &xml, ImageSpec &spec) |
DLLPUBLIC std::string | encode_xmp (const ImageSpec &spec, bool minimal=false) |
DLLPUBLIC void | _ImageIO_force_link () |
Variables | |
const stride_t | AutoStride = std::numeric_limits<stride_t>::min() |
Main namespace enclosing most OpenImageIO functionality.
Deprecated, Gelato <= 3 name for what we now call ImageSpec.
typedef unsigned long long OpenImageIO::imagesize_t |
Type we use to express how many pixels (or bytes) constitute an image, tile, or scanline. Needs to be large enough to handle very big images (which we presume could be > 4GB).
typedef bool(* OpenImageIO::ProgressCallback)(void *opaque_data, float portion_done) |
Pointer to a function called periodically by read_image and write_image. This can be used to implement progress feedback, etc. It takes an opaque data pointer (passed to read_image/write_image) and a float giving the portion of work done so far. It returns a bool, which if 'true' will STOP the read or write.
typedef unsigned char OpenImageIO::Runflag |
Data type for flags that indicate on a point-by-point basis whether we want computations to be performed.
typedef ptrdiff_t OpenImageIO::stride_t |
Type we use for stride lengths. This is only used to designate pixel, scanline, tile, or image plane sizes in user-allocated memory, so it doesn't need to represent sizes larger than can be malloced, therefore ptrdiff_t seemed right.
Pre-defined values for Runflag's.
DLLPUBLIC bool OpenImageIO::convert_image | ( | int | nchannels, | |
int | width, | |||
int | height, | |||
int | depth, | |||
const void * | src, | |||
TypeDesc | src_type, | |||
stride_t | src_xstride, | |||
stride_t | src_ystride, | |||
stride_t | src_zstride, | |||
void * | dst, | |||
TypeDesc | dst_type, | |||
stride_t | dst_xstride, | |||
stride_t | dst_ystride, | |||
stride_t | dst_zstride, | |||
float | gain = 1 , |
|||
float | gamma = 1 | |||
) |
Helper routine for data conversion: Convert an image of nchannels x width x height x depth from src to dst. The src and dst may have different data formats and layouts. Clever use of this function can not only exchange data among different formats (e.g., half to 8-bit unsigned), but also can copy selective channels, copy subimages, etc. If you're lazy, it's ok to pass AutoStride for any of the stride values, and they will be auto-computed assuming contiguous data. Return true if ok, false if it didn't know how to do the conversion.
DLLPUBLIC bool OpenImageIO::convert_types | ( | TypeDesc | src_type, | |
const void * | src, | |||
TypeDesc | dst_type, | |||
void * | to, | |||
int | n, | |||
float | gain = 1 , |
|||
float | gamma = 1 | |||
) |
Helper function: convert contiguous arbitrary data between two arbitrary types (specified by TypeDesc's), with optional gain and gamma correction. Return true if ok, false if it didn't know how to do the conversion.
DLLPUBLIC bool OpenImageIO::decode_iptc_iim | ( | const void * | exif, | |
int | length, | |||
ImageSpec & | spec | |||
) |
Add metadata to spec based on raw IPTC (International Press Telecommunications Council) metadata in the form of an IIM (Information Interchange Model). Return true if all is ok, false if the iptc block was somehow malformed. This is a utility function to make it easy for multiple format plugins to support embedding IPTC metadata without having to duplicate functionality within each plugin. Note that IIM is actually considered obsolete and is replaced by an XML scheme called XMP.
DLLPUBLIC bool OpenImageIO::decode_xmp | ( | const std::string & | xml, | |
ImageSpec & | spec | |||
) |
Add metadata to spec based on XMP data in an XML block. Return true if all is ok, false if the xml was somehow malformed. This is a utility function to make it easy for multiple format plugins to support embedding XMP metadata without having to duplicate functionality within each plugin.
DLLPUBLIC void OpenImageIO::encode_iptc_iim | ( | const ImageSpec & | spec, | |
std::vector< char > & | iptc | |||
) |
Find all the IPTC-amenable metadata in spec and assemble it into an IIM data block in iptc. This is a utility function to make it easy for multiple format plugins to support embedding IPTC metadata without having to duplicate functionality within each plugin. Note that IIM is actually considered obsolete and is replaced by an XML scheme called XMP.
DLLPUBLIC std::string OpenImageIO::encode_xmp | ( | const ImageSpec & | spec, | |
bool | minimal = false | |||
) |
Find all the relavant metadata (IPTC, Exif, etc.) in spec and assemble it into an XMP XML string. This is a utility function to make it easy for multiple format plugins to support embedding XMP metadata without having to duplicate functionality within each plugin. If 'minimal' is true, then don't encode things that would be part of ordinary TIFF or exif tags.
std::string OpenImageIO::error_message | ( | ) | [inline] |
Deprecated
float OpenImageIO::exposure | ( | float | value, | |
float | gain, | |||
float | invgamma | |||
) | [inline] |
Helper routine: compute (gain*value)^invgamma
DLLPUBLIC std::string OpenImageIO::geterror | ( | ) |
Special geterror() called after ImageInput::create or ImageOutput::create, since if create fails, there's no object on which call obj->geterror().
DLLPUBLIC int OpenImageIO::openimageio_version | ( | ) |
Retrieve the version of OpenImageIO for the library. This is so plugins can query to be sure they are linked against an adequate version of the library.
DLLPUBLIC int OpenImageIO::quantize | ( | float | value, | |
int | quant_black, | |||
int | quant_white, | |||
int | quant_min, | |||
int | quant_max, | |||
float | quant_dither | |||
) |
Helper routine: quantize a value to an integer given the quantization parameters.
const stride_t OpenImageIO::AutoStride = std::numeric_limits<stride_t>::min() |
Special value to indicate a stride length that should be auto-computed.