Image¶
-
LXiIMD_BYTE
¶ Images are defined by their pixel format which consists of a datatype and vector size. There are two data types. The BYTE type is an 8 bit integer in the range is 0 to 255. The FLOAT type is a 32-bit floating point number in the nominal range of 0.0 to 1.0. Operations on integer pixel values are clamped so the results are always in the valid range. Floating point colors are not clamped, so the images can represent superbright and superdark pixels.
LXiIMD_FLOAT
LXfIMD_MASK
LXxIMD_TYPE
-
LXiIMV_GREY
¶ The vector sizes are GREY which is one monochrome component; RGB which is a vector of three color components; or RGBA which is a vector of three color components and alpha. The alpha channel is represented by 0 for transparent, 255 for opaque if in byte format, and 1.0 for opaque if floating point format.
LXiIMV_RGB
LXiIMV_RGBA
LXfIMV_MASK
LXxIMV_TYPE
-
LXiIMT_INDEX
¶ Index images use the index flag.
LXiIMT_MASK
-
LXiIMP_GREY8
¶ Image pixel types are just the mask values combined together. Here are all six of the possible combinations in more convenient form. The color bits of an index mask can be acquired separately as well.
LXiIMP_GREYFP
LXiIMP_RGB24
LXiIMP_RGBFP
LXiIMP_RGBA32
LXiIMP_RGBAFP
LXiIMP_IGREY8
LXiIMP_IRGB24
LXiIMP_IRGBA32
LXi_IMP_ISGREY
LXiPROCESS_FAST
LXiPROCESS_MEDIUM
LXiPROCESS_ACCURATE
-
typedef unsigned int
LXtPixelFormat
¶
-
typedef unsigned int
LXtProcessHint
¶
-
typedef unsigned char
LXtImageByte
¶
-
typedef float
LXtImageFloat
¶
-
typedef unsigned int
LXtImageIndex
¶
-
LXiIMC_RED
¶ Color components in stored in vector type pixels are always in RGBA order. Use these indices to access components in a more abstract way.
LXiIMC_GREEN
LXiIMC_BLUE
LXiIMC_ALPHA
-
LXsIATTRNAME_CAM_TRANS
¶ Some name and types are defined for common attributes that are read or set by the application.
DPI Dots per Inch, which is the number of pixels in the image that will fit vertically in each inch of the printed image. To know the horizontal DPI you have to take pixel aspect into account.
PIXASPECT This is the aspect ratio of a single pixel in the image, computed as width/height. If the pixel height is one, then the pixel width is the same as the pixel aspect.
REGX0, REGX1, REGY0, REGY1 Pixel coordinates of the borders of the rendered region of the image. X and Y start at zero at the left and top of the image.
GAMMA Gamma is an exponent applied to unity-normalized color values in the image before saving. To get the “real” values for pixels in the image, the inverse gamma needs to be applied.
COMMENT Everyone’s got something to say, right?
LXsIATTRTYPE_CAM_TRANS
LXsIATTRNAME_WORLD_TO_CAM
LXsIATTRTYPE_WORLD_TO_CAM
LXsIATTRNAME_ISO
LXsIATTRTYPE_ISO
LXsIATTRNAME_EXPTIME
LXsIATTRTYPE_EXPTIME
LXsIATTRNAME_DPI
LXsIATTRTYPE_DPI
LXsIATTRNAME_APERATUREX
LXsIATTRTYPE_APERATUREX
LXsIATTRNAME_APERATUREY
LXsIATTRTYPE_APERATUREY
LXsIATTRNAME_CLIP_DIST
LXsIATTRTYPE_CLIP_DIST
LXsIATTRNAME_FOC_LENGTH
LXsIATTRTYPE_FOC_LENGTH
LXsIATTRNAME_PIXASPECT
LXsIATTRTYPE_PIXASPECT
LXsIATTRNAME_REGX0
LXsIATTRTYPE_REGX0
LXsIATTRNAME_REGX1
LXsIATTRTYPE_REGX1
LXsIATTRNAME_REGY0
LXsIATTRTYPE_REGY0
LXsIATTRNAME_REGY1
LXsIATTRTYPE_REGY1
LXsIATTRNAME_GAMMA
LXsIATTRTYPE_GAMMA
LXsIATTRNAME_COMMENT
LXsIATTRTYPE_COMMENT
LXsIATTRNAME_APPLY_DISPLAY_LUT
LXsIATTRTYPE_APPLY_DISPLAY_LUT
LXsSAV_OUTPUT_PIXEL_FORMAT
LXsSAV_OUTPUT_KNOWN_COLOR_SPACE
LXsIATTRNAME_OUTPUT_COLOR_SPACE
LXsIATTRTYPE_OUTPUT_COLOR_SPACE
LXsIATTRNAME_COLOR_MAPPING_SERVER_NAME
LXsIATTRTYPE_COLOR_MAPPING_SERVER_NAME
LXsIATTRNAME_OUTPUT_COLOR_SPACE_EMBEDDING
LXsIATTRTYPE_OUTPUT_COLOR_SPACE_EMBEDDING
LXsKNOWN_COLORSPACE_LINEAR
LXsDEFAULT_COLORSPACE_8BIT
LXsDEFAULT_COLORSPACE_16BIT
LXsDEFAULT_COLORSPACE_FLOAT
LXsDEFAULT_COLORSPACE_GREY
LXiDEFAULT_COLORSPACE_NONE
LXiDEFAULT_COLORSPACE_8BIT
LXiDEFAULT_COLORSPACE_16BIT
LXiDEFAULT_COLORSPACE_FLOAT
LXiDEFAULT_COLORSPACE_GREY
-
LXsIATTRNAME_LUMA
¶ The OpenEXR file specification suggests some common metadata appropriate for HDR or physically accurate images.
LUMA The luminance of a white pixel with r=g=b=1.0. The units, candela/m^2, match the ‘whiteLuminance’ OpenEXR standard attribute.
FOCDIST The focus distance for the camera.
APERTURE the aperture is given in f-stops, (focal length of the lens divided by the diameter of the iris opening).
LXsIATTRTYPE_LUMA
LXsIATTRNAME_FOCDIST
LXsIATTRTYPE_FOCDIST
LXsIATTRNAME_APERTURE
LXsIATTRTYPE_APERTURE
ILxImage¶
-
class
ILxImage
¶ This is the primary interface for image objects, and so this the GUID specified when attempting to load or save images.
Public Functions
-
void
Size
(LXtObjectID self, unsigned int *w, unsigned int *h)¶ The basic image interface allows clients to read colored pixels or entire lines. When reading pixels the client should always ask for an RGBA format, but for lines the full range of format conversions is possible.
-
LXtPixelFormat
Format
(LXtObjectID self)¶
-
LxResult
GetPixel
(LXtObjectID self, unsigned int x, unsigned int y, LXtPixelFormat type, void *pixel)¶
-
const void *
GetLine
(LXtObjectID self, unsigned int y, LXtPixelFormat type, void *buf)¶
-
void
LXsSAV_IMAGE_FLOAT
ILxImageSegment¶
-
class
ILxImageSegment
¶ Public Functions
-
LxResult
GetSegment
(LXtObjectID self, unsigned int y, unsigned int left, unsigned int right, LXtImageFloat *rgba)¶ An image segment is a sub-range of pixels within a scanline, which is always read in FP RGBA format, and written in any given format.
-
LxResult
SetSegment
(LXtObjectID self, unsigned int y, unsigned int left, unsigned int right, LXtPixelFormat type, const void *line)¶
-
LxResult
ILxImageWrite¶
-
class
ILxImageWrite
¶ Public Functions
-
void
Size
(LXtObjectID self, unsigned int *w, unsigned int *h)¶ Writing to an image requires a different interface. This provides methods for assigning color values to pixels or lines. Not all images will be writable.
-
LXtPixelFormat
Format
(LXtObjectID self)¶
-
LxResult
AddAttribute
(LXtObjectID self, const char *name, const char *type, unsigned *index)¶
-
LxResult
SetPixel
(LXtObjectID self, unsigned int x, unsigned int y, LXtPixelFormat type, const void *pixel)¶
-
LxResult
SetLine
(LXtObjectID self, unsigned int y, LXtPixelFormat type, const void *line)¶
-
void
ILxIndexImage¶
-
class
ILxIndexImage
¶ Public Functions
-
void
Size
(LXtObjectID self, unsigned int *w, unsigned int *h)¶ An index image is one that stores index values at the pixel locations and uses a lookup table to get the color. While the ILxImage interface gets the color values at each pixel, this interface allows access to the underlying index and color map.
-
LXtPixelFormat
Format
(LXtObjectID self)¶
-
LxResult
MapSize
(LXtObjectID self, unsigned *numColors)¶
-
LxResult
GetIndex
(LXtObjectID self, unsigned int x, unsigned int y, LXtImageIndex *index)¶
-
LxResult
GetMap
(LXtObjectID self, LXtImageIndex index, LXtPixelFormat type, void *pixel)¶
-
void
ILxIndexImageWrite¶
-
class
ILxIndexImageWrite
¶ Public Functions
-
void
Size
(LXtObjectID self, unsigned int *w, unsigned int *h)¶ Writing to an index image can only be done with one of these interfaces.
-
LXtPixelFormat
Format
(LXtObjectID self)¶
-
LxResult
AddAttribute
(LXtObjectID self, const char *name, const char *type, unsigned *index)¶
-
LxResult
SetIndex
(LXtObjectID self, unsigned int x, unsigned int y, LXtImageIndex index)¶
-
LxResult
SetMap
(LXtObjectID self, LXtImageIndex index, LXtPixelFormat type, const void *pixel)¶
-
void
ILxLayeredImage¶
-
class
ILxLayeredImage
¶ Public Functions
-
LxResult
Size
(LXtObjectID self, unsigned int *w, unsigned int *h)¶ In many cases it is useful to add channels to images beyond the basic R, G, B, and A. In other cases, it is useful to preserve multiple sub-images in a composition. These requirements can be met with a layered image object, consisting of a list of named, independent sub-images, each with their own dimensions, offset, and pixel type. Interlayer blending information is also associated with each layer, Photoshop style.
Size This returns the bounds of the image composition. While the combination of layer sizes and offsets makes it possible that some layers’ pixels will not all be in bounds, the entire composition will be cropped at (0,0) to (w,h).
-
unsigned int
Count
(LXtObjectID self)¶ Adding a standard format() method here would allow this object to masquerade as an ILxImage object… probably more confusing than useful.
Count return number of layers.
Image return ILxImage for layer at ‘index’.
Name return name for layer at ‘index’.
Type return type string and flags for layer at ‘index’.
-
LxResult
Image
(LXtObjectID self, unsigned int index, void **ppvObj)¶
-
LxResult
Name
(LXtObjectID self, unsigned int index, const char **name)¶
-
LxResult
Type
(LXtObjectID self, unsigned int index, unsigned int *flags, const char **type)¶
-
LxResult
Offset
(LXtObjectID self, unsigned int index, int *x, int *y)¶ Offset return pixel offset for layer at ‘index’ relative to complete layered image composition..
Blend returns the opacity and the image blend mode for layer at ‘index’. The image blend mode is one of the LXi_IBM_ modes.
-
LxResult
Blend
(LXtObjectID self, unsigned int index, float *opacity, unsigned int *mode)¶
-
LxResult
ChannelName
(LXtObjectID self, unsigned layerIndex, unsigned channelIndex, const char **name)¶ ChannelName Pass back the name of the channel at the given layer and channel index, which may be overridden by the user by inserting semicolon delimiters in between each channel name in the Shader Tree.
-
LxResult
Parent
(LXtObjectID self, unsigned layerIndex, int *parentIndex)¶ Parent Returns the parent layer index, or -1 if there is no parent
IsGroup Returns true if the layer is a group layer
-
LxResult
IsGroup
(LXtObjectID self, unsigned layerIndex, unsigned int *isGroup)¶
-
LxResult
ILxLayeredImageWrite¶
-
class
ILxLayeredImageWrite
¶ Public Functions
-
LxResult
AddLayer
(LXtObjectID self, LXtObjectID image, const char *name, const char **channelNames)¶ Layered image objects will provide an ILxLayeredImageWrite interface for writing.
AddLayer This is the way a layered image is actually created, adding layers by passing in ILxImage objects. The image object will be locked and released by the layered image, so clients may release the image after setting the layer.
SetType Layer type and flags can be set using this function.
SetOffset Pixel offsets for a layer are set with this function.
SetBlending The blending parameter (or opacity) and the blending mode are set with this function. A list of modes should appear here shortly…
-
LxResult
SetType
(LXtObjectID self, unsigned int index, int flags, const char *type)¶
-
LxResult
SetOffset
(LXtObjectID self, unsigned int index, int x, int y)¶
-
LxResult
SetBlending
(LXtObjectID self, unsigned int index, float blend, const char *mode)¶
-
LxResult
AddAttribute
(LXtObjectID self, const char *name, const char *type, int *index)¶
-
LxResult
ILxTileImage¶
-
class
ILxTileImage
¶ Public Functions
-
unsigned
LevelCount
(LXtObjectID self)¶ The tiled image interface provides a way for clients to implement images using tile trees. Tiles will themselves simply be images, so we can manage a global cache of them internally rather than depending on each implementation to manage an internal cache. A tile tree is a collection of “levels”, which are intended to be images of decreasing size. Each image level is broken into tiles, which allows us to only work on small portions of the image instead of loading an entire image. Typically, the image levels decrease in size by power of two. For example, one dimension of a normal tile tree of an image with size 1024x1024, and tiles of size 256x256, would look like this: Level 2 _ Level 1 _ _ Level 0 _ _ _ _ Where each _ represents a tile. One thing to note is that the meaning of “level” is reverse from ImageLevelSample; level 0 is the base of the tile tree, where each tile is the original size, and the highest value of level will have a single tile. Implementations of the TileImage interface are only required to be able to get the tiles at level 0; they may require the clients to generate tiles above level 0 by resizing the tiles below them.
LevelCount LevelCount returns the number of levels in the tile tree.
-
LxResult
GetTile
(LXtObjectID self, unsigned int level, unsigned int tileX, unsigned int tileY, void **ppvObj)¶ - GetTile is the direct way of getting a tile from the tile image. In general, this will be loaded directly from the file off disk. Tiles will simply be an ILxImageID. These should be created by the implementation, and the client will release them. It should return LXe_OK if it’s okay, but LXe_OUTOFBOUNDS if the tile isn’t in the image.
- GetTile
-
LxResult
GetTileSize
(LXtObjectID self, unsigned int level, unsigned int tileX, unsigned int tileY, unsigned int *width, unsigned int *height)¶ - GetTileSize will determine the width and height of a given tile, and place it in *width and *height. For a given TileImage, these will usually be constant and equal except for boundary tiles. It should return LXe_OK if it’s okay, but LXe_OUTOFBOUNDS if the tile isn’t in the image.
- GetTileSize
-
LxResult
GetLevelSize
(LXtObjectID self, unsigned int level, unsigned int *width, unsigned int *height, unsigned int *tilesWidth, unsigned int *tilesHeight)¶ - GetLevelSize will determine the size of an entire level both in pixel counts and tile counts. It will place the former in *width and *height, and the latter in *tilesWidth and *tilesHeight. Any of the pointers should be able to be NULL, if the caller only wants to get the tile dimensions, for instance. It should return LXe_OUTOFBOUNDS if the level isn’t in the image.
- GetLevelSize
-
LxResult
DetermineTile
(LXtObjectID self, unsigned int level, unsigned int x, unsigned int y, unsigned int *tileX, unsigned int *tileY)¶ - DetermineTile will determine which tile contains a given pixel at a given level, and place it in *tileX and *tileY. It should return LXe_OK normally, but LXe_OUTOFBOUNDS if the pixel isn’t on that level.
- DetermineTile
-
LxResult
DeterminePixel
(LXtObjectID self, unsigned int level, unsigned int x, unsigned int y, unsigned int *adjX, unsigned int *adjY)¶ - DeterminePixel will take in a pixel position X and Y for a given level, and put in *adjX and *adjY the position of the pixel within the tile that contains it. It should return LXe_OK normally, but LXe_OUTOFBOUNDS if the pixel isn’t on that level.
- DeterminePixel
-
unsigned
ILxImageLoaderTarget1¶
-
class
ILxImageLoaderTarget1
¶ Public Functions
-
LxResult
SetSize
(LXtObjectID self, LXtPixelFormat type, unsigned width, unsigned height)¶ Images can be loaded and saved with appropriate servers of the loader and saver class. Loading can be opaque for disk-based access, although most loaders are currently direct, so a format, type, size and number of colors must be specified by the recognition method to allow the host to create a suitable image object to receive the data. This is done using a target interface.
-
LxResult
SetMap
(LXtObjectID self, unsigned ncolor)¶
-
LxResult
LXtImageTarget1¶
-
struct
st_LXtImageTarget1
¶ Legacy struct, still provided for older image loaders.
ILxImageLoaderTarget¶
-
class
ILxImageLoaderTarget
¶ Public Functions
-
LxResult
SetSize
(LXtObjectID self, LXtPixelFormat type, unsigned width, unsigned height)¶ The latest image loader target interface. This has two additional methods.
SetColorspaceDepth
SetColorspace These can be used to specify more accurately which colorspaces to use for the given type.
-
LxResult
SetMap
(LXtObjectID self, unsigned ncolor)¶
-
LxResult
SetColorspaceDepth
(LXtObjectID self, unsigned depth)¶
-
LxResult
SetColorspace
(LXtObjectID self, const char *colorspace)¶
-
LxResult
ILxImageLevelSample¶
-
class
ILxImageLevelSample
¶ Public Functions
-
unsigned
Count
(LXtObjectID self)¶ Images can present an alternate interface that allows them to be accessed as a set of levels. The levels are filtered versions of the image at different scales, and typically are arranged in power-law series. The underlying implementation may be tiled, enabling access to images that are larger than the available memory, since the image server only needs sufficient memory for a single tile. Levels can be used directly when rendering so that the only levels used are those approximating the visual scale of the image in the rendered scene. The count returns the number of different levels in the image.
-
LxResult
GetLevelSize
(LXtObjectID self, unsigned level, unsigned *width, unsigned *height)¶ Each resolution level should be twice the size of the previous level, starting at 1x1 pixels for level zero, although the tiled image load can pass back slightly different dimensions for each resolution level, according to the needs of the tiled format. The image may or may not provide the full image as a level, although the full image must be accessible through the required ILxImage interface.
-
LxResult
SampleLevel
(LXtObjectID self, unsigned level, LXtImageSample *pixel, unsigned num)¶ Level images provide image data at a given resolution level, for an array of image samples.
-
LxResult
GetPixel
(LXtObjectID self, unsigned level, unsigned int x, unsigned int y, LXtPixelFormat type, void *pixel)¶ Pixels can be directly accessed from a given level, in either integer or floating-point RGBA format, using an x- and y-coordinate in the local coordinate system of the specified level.
-
const LXtImageFloat *
GetLine
(LXtObjectID self, unsigned level, unsigned y, LXtImageFloat *buf)¶ Levels also support line-by-line access through a modified version of the GetLine() method, which uses a y-coordinate in the local coordinate system of the specified level. The data returned is always RGBA in floating point.
-
unsigned
LXtImageSample¶
-
struct
st_LXtImageSample
¶ Sampling of a level is done using an array of structures, each with a pixel position in the level and a location to receive the RGBA data in floating point format.
-
LXi_IBM_NORMAL
¶ These are the blending modes:
LXi_IBM_ERASE
LXi_IBM_ADD
LXi_IBM_SUB
LXi_IBM_DIFF
LXi_IBM_MULTIPLY
LXi_IBM_SCREEN
LXi_IBM_OVERLAY
LXi_IBM_SOFTLIGHT
LXi_IBM_HARDLIGHT
LXi_IBM_DARKEN
LXi_IBM_LIGHTEN
LXi_IBM_COLORDODGE
LXi_IBM_COLORBURN
LXi_IBM_SCREEN2
LXi_IBM_REPLACE
LXi_IBM_ADDNORM
ILxImageService¶
-
class
ILxImageService
¶ Public Functions
-
LxResult
ScriptQuery
(LXtObjectID self, void **ppvObj)¶ Image facilities can be accessed through the SDK using a global service interface.
-
LxResult
Create
(LXtObjectID self, unsigned int width, unsigned int height, LXtPixelFormat type, unsigned int maxIndex, void **ppvObj)¶
-
LxResult
Duplicate
(LXtObjectID self, LXtObjectID source, LXtPixelFormat type, void **ppvObj)¶
-
LxResult
Load
(LXtObjectID self, const char *filePath, void **ppvObj)¶
-
LxResult
Save
(LXtObjectID self, LXtObjectID image, const char *filePath, const char *format, LXtObjectID monitor)¶
-
LxResult
Resample
(LXtObjectID self, LXtObjectID dest, LXtObjectID source, LXtProcessHint hint)¶
-
LxResult
Composite
(LXtObjectID self, LXtObjectID dest, LXtObjectID source, const LXtFVector2 pos)¶
-
LxResult
DrawLine
(LXtObjectID self, LXtObjectID image, const LXtFVector2 p0, const LXtFVector2 p1, const LXtFVector color)¶
-
LxResult
Kelvin2RGB
(LXtObjectID self, float kelvin, LXtFVector rgbColor)¶
-
LxResult
RGB2Kelvin
(LXtObjectID self, const LXtFVector rgbColor, float *kelvin)¶
-
LxResult
CreateCrop
(LXtObjectID self, LXtObjectID sourceImage, double x, double y, double w, double h, void **ppvObj)¶
-
LxResult
ImageGetBuffer
(LXtObjectID self, LXtObjectID sourceImage, LXtPixelFormat type, void *buf)¶ This reads the entire image into a single buffer given the pixel format. This is just like Image::GetLine() except that it does all the lines at once.
-
LxResult
LoadNoCache
(LXtObjectID self, const char *filePath, void **ppvObj)¶ LaodNoCache() is the same as Load(), but the image is not added to the intenral cache. This is useful when the image is only needed once (say, because it is being loaded and resized).
-
LxResult
CreateLayered
(LXtObjectID self, unsigned int width, unsigned int height, unsigned int layerNum, void **ppvObj)¶
-
LxResult
SaveLayered
(LXtObjectID self, LXtObjectID layeredImage, const char *filePath, const char *format, LXtObjectID monitor)¶
-
LxResult
ILxImageBlockCodec¶
-
class
ILxImageBlockCodec
¶ Public Functions
-
LxResult
Compress
(LXtObjectID self, LXtObjectID image, unsigned char **buf, int *size)¶ Image block codec interfaces allow an image to be compressed into a block of data which can then be included in other files, such as for thumbnails. Compress() allocates and returns a block encoding the image. Free() frees the block when the client is done. Decompress() creates an image from a block.
-
void
Free
(LXtObjectID self, unsigned char *buf, int size)¶
-
LxResult
Decompress
(LXtObjectID self, unsigned char *buf, int size, void **ppvObj)¶
-
LxResult
ILxImageFilter¶
-
class
ILxImageFilter
¶ Public Functions
-
unsigned int
Type
(LXtObjectID self)¶ Full image evaluation is using the ILxImageFilter interface. There are two kinds of filters, Single Sample and Multi Sample. Single Sample is reminiscent of pixel filters, and are provided with a single pixel to evaluate and set. Multi Sample filters get an entire image buffer to evaluate at once. A Multi Sample filter can do everything a Single Sample filter can, but you have to do more work by looping through the pixels in the image yourself and creating a new image buffer, thus using more memory. The Type() method returns the type of filter, given by one of the codes below. These select which operational method is called and how its results are interpreted.
-
LxResult
Generate
(LXtObjectID self, int width, int height, LXtObjectID monitor, void **ppvObj)¶ Generate is called on the first filter to generate the base image.
-
LxResult
MultiSample
(LXtObjectID self, LXtObjectID monitor, LXtObjectID image, void **ppvObj)¶ Multi Sample filters can perform convolutes and other operations that involve sampling multiple pixels. They are responsible for creating the output image itself, which can even be at a different resolution, although I’m not sure how good of an idea this is. Blurs, sharpen, trace edge and similar filters requiring multiple samples of an image should be of this type.
-
LxResult
SingleSample
(LXtObjectID self, const LXtColorRGBA src, LXtColorRGBA dest)¶ Single Sample filters are provided with the RGBA values of a single pixel to evaluate. The filter function is called for each pixel in turn. This is a good choice for things like creating negatives, performing gamma correction, tinting and other operations that don’t rely on multiple samples.
-
LxResult
SingleSampleN
(LXtObjectID self, const LXtImageFloat *src, LXtImageFloat *dest, unsigned num)¶ The multi-sample version of the single-sample filter allows an array of RGBA tuples to be transformed at once. This is used when entire lines need to be filtered but pixels are still independent. Filters that support SingleSampleN() must also support SingleSample().
-
unsigned int
LXi_IMAGE_GENERATOR
LXi_IMAGE_SINGLE_SAMPLE
LXi_IMAGE_MULTI_SAMPLE
LXi_IMAGE_SINGLE_SAMPLE_N
ILxImageFilterSample¶
-
class
ILxImageFilterSample
¶ Public Functions
-
LxResult
SpotSample
(LXtObjectID self, float x, float y, float spotSize, float *rgba)¶ This interface is designed for texturing. It returns a sample in a texture defined by a fraction of the width and height of the image, automatically generating mip maps and blending between them. ‘spotSize’ is a fraction of the image size. The four element ‘rgba’ array will be filled with the sample. If for some reason the stack evaluation failed, this will return 0, and the ‘rgba’ array will be set to all zeros.
-
LxResult
LXtImageMetrics¶
-
struct
st_LXtImageMetrics
¶ This interface can be used to get the metrics filled in by the generator. Since the generator is responsible for this, this function may cause the stack to generate a with VCEVALf_METRICS_ONLY specifically for this information.
ILxImageFilterMetrics¶
-
class
ILxImageFilterMetrics
¶ Public Functions
-
LxResult
Generate
(LXtObjectID self, LXtImageMetrics *metrics)¶ maxRes This should be set to the maximum width and height that the image can be generated at, or 0 for no limit. For image loaders, this would be the size of the image itself; for a Flash loader, this might be some maximum size entered by the user. Any attempt to generate an image greater than this will result in an image being generated at maxRes.
pixelType This should be set to the pixel type for the images this stack will generate.
aspect This should be set to the aspect ratio of the image. For example, 4:3 aspect would be 1.3333. Generate is called on the first filter to generate the base metrics. Evaluate is called for subsequent filters and may modify the metrics from the upstream source.
-
LxResult
Evaluate
(LXtObjectID self, LXtImageMetrics *metrics)¶
-
LxResult
LXtImageMetrics1¶
-
struct
st_LXtImageMetrics1
¶ This interface was retired in modo 14.1.
ILxImageFilterMetrics1¶
-
class
ILxImageFilterMetrics1
¶ Public Functions
-
LxResult
Generate
(LXtObjectID self, LXtImageMetrics1 *metrics)¶
-
LxResult
Evaluate
(LXtObjectID self, LXtImageMetrics1 *metrics)¶
-
LxResult
LXsMOVIE_SAVESTEREO
LXsMOVIE_OPTIONSCOMMAND
ILxMovie¶
-
class
ILxMovie
¶ Since there’s really no better place for this we’ll put the simple animation interface here. This is a very simple API for creating animations. The LXsMOVIE_OPTIONSCOMMAND tag identifies a command that should be executed to set options for the movie saver. It is commonly called when the user has chosen the movie saver from a file dialog, and in any other situation where the user needs to be presented with saver options before actually saving the movie.
Public Functions
-
LxResult
BeginMovie
(LXtObjectID self, const char *fname, int w, int h, int flags)¶ Movie creation API is pretty simple - you begin a movie, add a bunch of images in sequence, and then end it. The movie itself lives on disk at the path specified. There are currently no flags defined, but there may be in the future. Default format is MP4 and default framerate is 15 fps.
-
LxResult
SetFramerate
(LXtObjectID self, int frate)¶ Before adding any frames, you can change the framerate from the default of 15 with following method.
-
LxResult
AddImage
(LXtObjectID self, LXtObjectID image)¶ Adding an image is straightforward. Do this in sequence.
-
LxResult
EndMovie
(LXtObjectID self)¶ When done adding images, call this to finalize the movie and write it to disk.
-
LxResult
AddAudio
(LXtObjectID self, LXtObjectID audio)¶ Adding an audio track. This must be called after adding all images before EndMove.
-
LxResult