HDK
|
File options for manipulating image data on load or save. This class allows you to modify the incoming or outgoing image data by scaling, flipping, converting or cropping the data. It can be optionally passed to IMG_File::open() or IMG_File::create() More...
#include <IMG_FileParms.h>
File options for manipulating image data on load or save. This class allows you to modify the incoming or outgoing image data by scaling, flipping, converting or cropping the data. It can be optionally passed to IMG_File::open() or IMG_File::create()
Definition at line 38 of file IMG_FileParms.h.
IMG_FileParms::IMG_FileParms | ( | ) |
void IMG_FileParms::adjustGammaForFormat | ( | IMG_Stat & | stat, |
const IMG_Format * | format, | ||
IMG_DataType | override_type = IMG_DT_ANY |
||
) |
Set the gamma and scope to apply any needed gamma correction to planes being written. This overwrites any applyGamma() changes.
|
inline |
Accessors
Definition at line 122 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 121 of file IMG_FileParms.h.
void IMG_FileParms::applyGamma | ( | fpreal | gamma, |
const UT_StringHolder & | gamma_scope = UT_StringHolder() |
||
) |
Color correct an image using a gamma setting Apply gamma to the planes matching the scope (ie, "C spec diff", "C*", "*beauty*") If no gamma_scope
is specified, "*" is ued.
void IMG_FileParms::applyLUT | ( | const char * | lut, |
const UT_StringHolder & | plane_scope = UT_StringHolder() , |
||
bool | ocio = false |
||
) |
Color correct an image using a LUT apply a lookup table to the data, but only those planes that match the scope (ie, "C spec diff", "C*", "*beauty*") If no plane_scope
is specified, "*" is used.
|
inline |
Accessors
Definition at line 114 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 115 of file IMG_FileParms.h.
|
inline |
Definition at line 340 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 113 of file IMG_FileParms.h.
void IMG_FileParms::detectAlphaDetails | ( | ) |
Returns information about the image's alpha channel Checks to see if the alpha plane is constant 1, cutout 0/1, constant valued, varying, out-of-range (>1 or <0) or absent. Load only.
void IMG_FileParms::dump | ( | ) | const |
Debug
void IMG_FileParms::dump | ( | UT_JSONWriter & | w | ) | const |
Debug
|
inline |
Accessors
Definition at line 141 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 139 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 127 of file IMG_FileParms.h.
void IMG_FileParms::flipImageHorizontal | ( | ) |
Flip the image in either direction. flip the images in either direction. May cancel out any orientation flipping.
void IMG_FileParms::flipImageVertical | ( | ) |
Flip the image in either direction. flip the images in either direction. May cancel out any orientation flipping.
|
inline |
Accessors
Definition at line 126 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 128 of file IMG_FileParms.h.
void IMG_FileParms::flopImage | ( | ) |
rotate the image 90', flopping it on its side.
|
inline |
LUT Accessors
Definition at line 378 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 364 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 365 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 147 of file IMG_FileParms.h.
Accessors
Definition at line 150 of file IMG_FileParms.h.
|
inline |
Import an option
Definition at line 317 of file IMG_FileParms.h.
|
inline |
Import an option
Definition at line 319 of file IMG_FileParms.h.
|
inline |
Import an option
Definition at line 321 of file IMG_FileParms.h.
|
inline |
Import an option
Definition at line 323 of file IMG_FileParms.h.
|
inline |
Import an option
Definition at line 325 of file IMG_FileParms.h.
|
inline |
Import an option
Definition at line 327 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 116 of file IMG_FileParms.h.
|
inline |
Definition at line 346 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 145 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 148 of file IMG_FileParms.h.
void IMG_FileParms::limitImageRes | ( | int | x, |
int | y, | ||
UT_FilterType | ft = UT_FILTER_BOX , |
||
bool | preserve_aspect = true |
||
) |
limit the image to a maximum resolution. Scale to this res, preserving the aspect ratio if requested.
|
inline |
Accessors
Definition at line 123 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 361 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 363 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 362 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 136 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 137 of file IMG_FileParms.h.
|
inline |
Access to options
Definition at line 311 of file IMG_FileParms.h.
|
inline |
Access to options
Definition at line 310 of file IMG_FileParms.h.
|
inline |
Definition at line 347 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 366 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 371 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 367 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 369 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 370 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 368 of file IMG_FileParms.h.
|
inline |
LUT Accessors
Definition at line 379 of file IMG_FileParms.h.
UT_StringArray IMG_FileParms::options | ( | ) | const |
Access to options
UT_StringArray IMG_FileParms::optionValues | ( | ) | const |
Access to options
void IMG_FileParms::orientImage | ( | IMG_XOrientation | x, |
IMG_YOrientation | y | ||
) |
options for orienting and flipping the image. Default orientation is LEFT_FIRST, BOTTOM_FIRST. You can set each to 'none' if you don't care.
|
inline |
Accessors
Definition at line 124 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 125 of file IMG_FileParms.h.
void IMG_FileParms::powerTwoOnly | ( | ) |
images must be read as powers of two. Does not preserve aspect ratio.
|
inline |
Accessors
Definition at line 138 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 134 of file IMG_FileParms.h.
void IMG_FileParms::readAlphaAsPlane | ( | ) |
If true, alpha will be read into its own plane, instead of an RGBA color plane. Color will be read as its own plane as well, RGB.
void IMG_FileParms::readAsIs | ( | ) |
This method turns off any option that would result in image translation.
|
inline |
Accessors
Definition at line 143 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 135 of file IMG_FileParms.h.
void IMG_FileParms::scaleImageBy | ( | fpreal | x, |
fpreal | y, | ||
UT_FilterType | ft = UT_FILTER_BOX |
||
) |
scale the image by scaling factors (x,y).
void IMG_FileParms::scaleImageTo | ( | int | x, |
int | y, | ||
UT_FilterType | ft = UT_FILTER_BOX |
||
) |
If the color model is set to IMG_1CHAN, and the actual color model.
RESOLUTION -----------------------------------------------------—— using these methods always scales. To crop, use the data window methods Note that the filter is shared, so if more than one of these is called, the last filter setting is used. Scale the image to resolution (x,y). (0 = use original dimension)
Isolate mip level to load (0 being base resolution). IMG_File::open() may return nullptr if invalid mip level is specified. If the file doesn't have pre-generated mipmaps, IMG_File::open() will generate mipmap level on the fly. This object holds the cache for intermediate mip levels if they're being generated, so if you're opening the same file multiple times with different mip level selected, it's recommended that you reuse this parm object (as long as it's within the same thread).
|
inline |
Accessors
Definition at line 119 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 117 of file IMG_FileParms.h.
If demoting from a deep raster to an RGB(A) image, these methods allow you to specify the plane(s) to copy to RGB(A), by name or index. Selects serveral planes by name pattern, such as "C", "C A Pz" "P? C*"
void IMG_FileParms::selectPlanes | ( | const UT_IntArray & | planeindices | ) |
If demoting from a deep raster to an RGB(A) image, these methods allow you to specify the plane(s) to copy to RGB(A), by name or index. Selects a plane by index. Indices are specified from 1 to # planes.
If demoting from a deep raster to an RGB(A) image, these methods allow you to specify the plane(s) to copy to RGB(A), by name or index. Selects several planes by numeric pattern, ie. "1", "1 3 4", "[1-3] 5"
void IMG_FileParms::setColorModel | ( | IMG_ColorModel | cm | ) |
Convert to a different number of pixel components convert to a standard color model, if needed (RGB, RGBA, single). When moving from fewer components to more components, the data is either duplicated (1chan->RGB) or generated (RGB-RGBA, A=1).
void IMG_FileParms::setComponentOrder | ( | IMG_ComponentOrder | order | ) |
Convert to either an RGBA or ABGR ordering converts the component ordering to RGBA or ABGR (or RGB/BGR, RG/GR) without forcing the color model to a specific number of components.
|
inline |
If set, files will not report errors and subsequent scanlines will be returned as black.
Definition at line 338 of file IMG_FileParms.h.
void IMG_FileParms::setDataType | ( | IMG_DataType | dt | ) |
Convert to a different data type convert the image to this data type, if needed (default = use native)
void IMG_FileParms::setDataWindowOnly | ( | ) |
Normally, a data window is expanded or cropped to the image resolution. calling this will always read only the data window. Used only for reading.
void IMG_FileParms::setEnableMipLevel0Cache | ( | bool | val | ) |
optimizes mipmap generation by caching level0
|
inline |
Set metadata
Definition at line 293 of file IMG_FileParms.h.
|
inline |
Set metadata
Definition at line 295 of file IMG_FileParms.h.
|
inline |
Set metadata
Definition at line 297 of file IMG_FileParms.h.
|
inline |
Set metadata
Definition at line 299 of file IMG_FileParms.h.
|
inline |
Set metadata
Definition at line 301 of file IMG_FileParms.h.
LUT Accessors
Definition at line 373 of file IMG_FileParms.h.
void IMG_FileParms::setInterleaved | ( | IMG_Interleave | i | ) |
Interleaves or deinterleaves pixel data Determines how to format the data.
void IMG_FileParms::setLuminanceFunc | ( | PXL_LumFunction | f | ) |
is RGB or higher, this method determines how to convert the vector into a scalar. By default, the luminance is taken.
|
inline |
Definition at line 348 of file IMG_FileParms.h.
void IMG_FileParms::setMipRoundMode | ( | IMG_MipRoundMode | mode | ) |
mipmap rounding mode (ie how next resolution down is calculated)
void IMG_FileParms::setOCIODestColorSpace | ( | const UT_StringHolder & | ocio_colorspace | ) |
Specifies the destination colorspace when reading, and the source colorspace when writing (ie, the colorspace the raster is in, not the file contents). Default colorspace is the scene linear role. Only active if an OCIO LUT is used.
void IMG_FileParms::setOCIOLooks | ( | const UT_StringHolder & | looks | ) |
One or more looks (color transforms) that are applied to the image after reading or before writing, in order of specification (whitespace separated list).
void IMG_FileParms::setOCIOSourceDisplay | ( | const UT_StringHolder & | display, |
const UT_StringHolder & | view | ||
) |
Set OCIO Source display/view (if the image data already has tone mapping baked in).
void IMG_FileParms::setOCIOTransform | ( | const UT_StringHolder & | sspace, |
const UT_StringHolder & | dspace, | ||
const UT_StringHolder & | looks, | ||
const UT_StringHolder & | lut_scope = UT_StringHolder() |
||
) |
Set up OCIO information fully
void IMG_FileParms::setOCIOTransformView | ( | const UT_StringHolder & | sspace, |
const UT_StringHolder & | display, | ||
const UT_StringHolder & | view, | ||
bool | forward, | ||
const UT_StringHolder & | lut_scope = UT_StringHolder() |
||
) |
Set up OCIO information fully
void IMG_FileParms::setOCIOView | ( | const UT_StringHolder & | view, |
bool | forward_transform | ||
) |
Set the OCIO view for transformation.
set an input/output tag option for the format.
|
inline |
Set metadata option.
Definition at line 287 of file IMG_FileParms.h.
options are a list of argument pairs, such as "artist", "Tom Smith". The options list is terminated by a NULL.
void IMG_FileParms::setOptions | ( | const IMG_TileOptions & | info_with_options | ) |
options are specified in the IMG_TileOptions structure
void IMG_FileParms::setOptions | ( | const UT_Options & | options | ) |
set options based on a UT_Options (this is similar to using IMG_TileOptions)
options are in a whitespace separated string "Artist 'Tom Jones'"
void IMG_FileParms::setWindow | ( | const UT_DimRect & | area | ) |
read the image region in 'area' only (even if we need to crop or expand the image to fill it). Used only for reading.
read the image region in 'area' in UV coords. Used only for reading.
void IMG_FileParms::useTileInterface | ( | ) |
Enable the tile inteface for reading or writing If called, we're reading or writing tiles using IMG_File::readTile and IMG_File::writeTile. The scanline versions will not work.
|
inline |
Accessors
Definition at line 129 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 130 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 132 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 131 of file IMG_FileParms.h.
|
inline |
Accessors
Definition at line 133 of file IMG_FileParms.h.