< Previous | Contents | Manuals Home | Boris FX | Next >

Images

You can create, read, modify, and write images from within Sizzle. Images can be created from the Scene object via Scene.ReadImage() or Scene.NewImage(), or from the image preprocessor via Shot.Image(), as well as other miscellaneous functions. Images from the preprocessor cannot be changed. Sizzle images are references to the underlying object; the image isn't destroyed until there are no references to it left in existence. Note that y runs from 0 at the top to h-1 at the bottom.

.Alpha(x,y) 0..1 floating-point alpha channel value (regardless of the underlying image format). If no alpha channel is present, then the alpha value is 0.0 for exactly black pixels, and 1.0 for all others.

.ApplyUVMap( map) Produces a new image that is the result of

mapping this image through the UVMap (map). Bilinear interpolation only (no Lanczos etc).

.Blue(x,y) 0..1 floating-point blue channel value (regardless of the underlying image format).

.Color(x,y) 24-bit integer RGB color at the coordinates.

.Denoise(noisred) Apply the noise reduction algorithm with that parameter, returning a new image.

.Fill(x0,y0, x1,y1, colr) Fills the given rectangle to the 24-bit RGB

color. The x0,y0 and x1,y1 values are included in the rectangle. Can be used for simple horizontal and vertical lines.

.Fill(x0,y0, x1,y1, r,g,b) Fills the given rectangle to the given r,g,b

color. The x0,y0 and x1,y1 values are included in the rectangle. Can be used for simple horizontal and vertical lines.

.format An integer describing the image's data format: 0: 8-bit; 1: 16-bit; 2: half-float; 3: floating point. Read only.

.Green(x,y) 0..1 floating-point green channel value (regardless of the underlying image format).


.hasAlpha Image has an alpha channel. Read/write; writing to it clears any existing alpha channel, then optionally adds a new alpha channel.

.height The height of the image in pixels. Read only.

.InvertUVMap(w, h) Assuming the current image is a UV map, return an inverse map with the size w,h. Note that UV map inversion is inherently a slow, precarious, and approximate process.

.is16Bit Image has 16-bit-integer data. Read only.

.isFloat Image has floating-point data (half or float).

Read only.

.isMonochrome Image has monochrome-only data. Read only.

.MetaCount() The number of metadata values in the image.

.MetaNameByIndex(n) The nth metadata item's name (string) in the

image.

.MetaPresent(metanm) Zero or one depending on whether or not

metadata with the given name is present in the image.

.MetaValue (metanm) The metadata with the given name in the

image. The value is always a string; convert to an appropriate value as needed. Write metadata with SetMetaValue(). See "Shot Metadata" in the SynthEyes User Manual, in addition to the following Shot Metadata section, for information about pre-defined metadata names.

.MetaValueByIndex(n) The nth metadata item's value in the image.

The value is always a string; convert to an appropriate value as needed.

.readOnly Image is read only (ie if it came from the image preprocessor). Read only.

.Red(x,y) 0..1 floating-point red channel value (regardless of the underlying image format).

.scaling Floating-point scaling factor applied to floating data to convert it to and from integers.

.SetAlpha(x,y, alp) Set the alpha-channel value to this 0..1 floating-point value.

.SetBlue(x,y, blu) Set the blue-channel value to this 0..1 floating-point value.

.SetColor(x,y, colr) Set the pixel to this 24-bit integer RGB value.

.SetGreen(x,y, grn) Set the green-channel value to this 0..1 floating-point value.

.SetMetaValue(nm, vl) Set or update a metadata value for the given

name. The vl argument can be null or any type that can self-convert to a string.

.SetRed(x,y, red) Set the red-channel value to this 0..1 floating- point value.

.SetRGB(x,y, r,g,b) Sets the pixel to the given r,g,b values (0..1).

.width The width of the image in pixels. Read only.

.Write(fnm [, cmpr[, pixelAspect]]) Writes the file to the given file name, in the

format determined by the filename's extension. (NOT in Demo version) The optional cmpr argument specifies the compression type; without it, a default compression format is used. Use "none" to force no compression for all format types. Examine Shot.previewCompression and

.renderCompression for the image-format- specific encoding examples. An optional pixel aspect ratio can also be supplied; usage

©2023 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.