Class: AxImage

AxImage(sourcenon-null, pixelFormatnon-null)

new AxImage(sourcenon-null, pixelFormatnon-null)

Creates an instance of AxImage
Parameters:
Name Type Description
source AxImage Source image to copy
pixelFormat AxPixelFormat Pixel format for the new image
Source:

Methods

Copy(source)

Copies another image and sets the pixel format and size accordingly
Parameters:
Name Type Description
source AxImage The image to copy from
Source:

CopyPixels(source, srcX, srcY, srcZ, destX, destY, destZ, width, height, depth)

Copies pixels from a specified region of another image to a specified region. Image size and pixel format are not changed and no pixel format conversion is performed
Parameters:
Name Type Description
source AxImage The source image to copy pixels from
srcX Integer The X coordinate of the starting point of the region to copy from the source
srcY Integer The Y coordinate of the starting point of the region to copy from the source
srcZ Integer The Z coordinate of the starting point of the region to copy from the source
destX Integer The X coordinate of the starting point of the region to copy to
destY Integer The Y coordinate of the starting point of the region to copy to
destZ Integer The Z coordinate of the starting point of the region to copy to
width Integer The width of the region to copy
height Integer The height of the region to copy
depth Integer The depth of the region to copy
Source:

CopyPixels_2(source, srcX, srcY, srcZ, width, height, depth)

Copies pixels from a specified region of another image Image size and pixel format are not changed and no pixel format conversion is performed
Parameters:
Name Type Description
source AxImage The source image to copy pixels from
srcX Integer The X coordinate of the starting point of the region to copy from the source
srcY Integer The Y coordinate of the starting point of the region to copy from the source
srcZ Integer The Z coordinate of the starting point of the region to copy from the source
width Integer The width of the region to copy
height Integer The height of the region to copy
depth Integer The depth of the region to copy
Source:

CopyPixels_3(source)

Copies pixels from another image Image size and pixel format are not changed and no pixel format conversion is performed
Parameters:
Name Type Description
source AxImage The source image to copy pixels from
Source:

Dispose()

Disposes resources
Source:

GetPixel(x, y, z) → {Integer}

Gets the pixel at the given coordinates of the image No pixel format conversion is performed
Parameters:
Name Type Description
x Integer The X coordinate of the pixel to get
y Integer The Y coordinate of the pixel to get
z Integer The Z coordinate of the pixel to get
Source:
Returns:
The color value of the pixel at the given coordinates. Contains all the channels, encoded in the pixel format of the image
Type
Integer

GetPixelFormat() → {AxPixelFormat}

Gets the pixel format of the image
Source:
Returns:
The pixel format of the image
Type
AxPixelFormat

GetSample(u, v, z) → {Integer}

Gets a sample color from a given Z-layer at given coordinates ranging from 0 to 1 The sampling uses linear interpolation
Parameters:
Name Type Description
u Number The X coordinate to get a sample at
v Number The Y coordinate to get a sample at
z Integer The Z coordinate of the layer to get the sample from
Source:
Returns:
A color value sampled at the the given coordinates. Contains all the channels, encoded in the pixel format of the image
Type
Integer

GetSample_2(u, v, w) → {Integer}

Gets a sample color at a given coordinates ranging from 0 to 1 The sampling uses linear interpolation
Parameters:
Name Type Description
u Number The X coordinate to get a sample at
v Number The Y coordinate to get a sample at
w Number The Z coordinate to get a sample at
Source:
Returns:
A color value sampled at the the given coordinates. Contains all the channels, encoded in the pixel format of the image
Type
Integer

Load(source, callbackContext, callback)

Loads the image from a given stream If the particular implementation of AxImage does not support the format in which the source data is encoded, it should return false Different implementations of AxImage can load differently encoded images
Parameters:
Name Type Description
source AxStream Stream containing the image encoded in its particular format
callbackContext * An object which is to be passed to the callback. It can be used to serve as a context for the callback or just to pass any relevant data
callback AxImageLoadedCallback A callback method which is to be called when the loading has finished
Source:

Save(destination, format) → {Boolean}

Saves the image to the given stream in the given encoding format If the particular implementation of AxImage does not support the requested encoding format, it should return false and shouldn't write anything to the stream Different implementations of AxImage can save images in different encodings
Parameters:
Name Type Description
destination AxStream Stream to which the image will be written in the requested format
format String Format in which to encode the image. For example, such as 'jpg', 'png' and etc.
Source:
Returns:
True if the image was successfully saved to the given stream in the given encoding format
Type
Boolean

SetPixel(x, y, z, value)

Sets a pixel to the given coordinates of the image No pixel format conversion is performed
Parameters:
Name Type Description
x Integer The X coordinate of the pixel to set
y Integer The Y coordinate of the pixel to set
z Integer The Z coordinate of the pixel to set
value Integer The color value of the pixel to be set. Contains all the channels, encoded in the pixel format of the image
Source:

SetPixelFormat(pixelFormat, dithernon-null)

Sets the pixel format of the image data and performs dithering if required
Parameters:
Name Type Description
pixelFormat AxPixelFormat If true, dithering is performed on matching channels which have their bit count reduced
dither Boolean If true, dithering is performed on matching channels which have their bit count reduced. If omitted, a value of true is assumed
Source:

SetSize(width, height, depth)

Sets the size of the image, allocating the required amount of memory according to the given size and the pixel format of the image
Parameters:
Name Type Description
width Integer The width in pixels for the new size of the image
height Integer The height in pixels for the new size of the image
depth Integer The depth in pixels for the new size of the image
Source:

Documentation generated by JSDoc 3.5.3 on Wed Jan 17 2018 17:06:57 GMT+0200 (FLE Standard Time)