[]
Represents a grayscale image or transparency mask with 8 bits per pixel.
new GrayscaleBitmap(
width,
height,
gbProperties?): GrayscaleBitmap;
Creates a GrayscaleBitmap instance with optionally initialized pixels.
number
The grayscale bitmap width, in pixels.
number
The grayscale bitmap height, in pixels.
The settings for creating a grayscale bitmap.
GrayscaleBitmap
ObjectBase.constructor
new GrayscaleBitmap(
om,
width,
height,
gbProperties?): GrayscaleBitmap;
Creates a GrayscaleBitmap instance with optionally initialized pixels.
An object manager that controls the lifetime of the GrayscaleBitmap object.
number
The grayscale bitmap width, in pixels.
number
The grayscale bitmap height, in pixels.
The settings for creating a grayscale bitmap.
GrayscaleBitmap
ObjectBase.constructor
get height(): number;
Gets the height of the GrayscaleBitmap, in pixels.
number
get id(): number;
Gets the reference to the object.
number
get om(): ObjectManager;
Gets the owner ObjectManager instance.
get transparencyMask(): boolean;
Gets or sets a value indicating whether the image is used to define an alpha mask of another image.
boolean
set transparencyMask(value): void;
Gets or sets a value indicating whether the image is used to define an alpha mask of another image.
boolean
void
get whiteIsZero(): boolean;
Gets or sets a value specifying whether 0 represents white and 255 represents black (if true) or vice versa (if false).
boolean
set whiteIsZero(value): void;
Gets or sets a value specifying whether 0 represents white and 255 represents black (if true) or vice versa (if false).
boolean
void
get width(): number;
Gets the width of the GrayscaleBitmap, in pixels.
number
adjustLevels(
blackPoint,
whitePoint,
outputBlack,
outputWhite,
midtone?): void;
Adjusts the levels of an image histogram. The method maps the input range of values (blackPoint..whitePoint) to the output range (outputBlack..outputWhite) using the specified gamma correction (midtone).
number
The input black point (between 0 and 255).
number
The input white point (between 0 and 255).
number
The output black point (between 0 and 255).
number
The output white point (between 0 and 255).
number
The value of gamma correction.
void
applyGaussianBlur(
radius?,
borderMode?,
borderColor?): void;
Applies a Gaussian blur to this GrayscaleBitmap.
number
The radius of the blur, in pixels.
The mapping mode for the pixels outside of the border, "RepeatEdge" if null.
number
The color used to blend with the edge pixels of the image (between 0 and 255).
void
applyGlow(infRadius?, blurRadius?): void;
When applied to a grayscale mask built from a color image using the Bitmap#toGrayscaleBitmap method, modifies it so that the result can be used as a transparency mask to produce "Glow" or "Soft Edges" effects.
number
The radius of inflation (positive, glow) or deflation (negative, soft edges), in pixels.
number
The radius of Gaussian blur, in pixels.
void
autoContrast(): void;
Modifies pixel intensities such that available range of values (0..255) is fully covered.
void
autoContrast(lowClipFraction, highClipFraction): void;
Modifies pixel intensities, clipping extremely low and extremely high values, such that available range of values (0..255) is fully covered.
number
The fraction of extremely low values to be clipped, not greater than 0.1.
number
The fraction of extremely high values to be clipped, not greater than 0.1.
void
clear(value, bounds?): void;
Clears the GrayscaleBitmap with the specified value.
number
The value (between 0 and 255) to fill the image.
The target rectangle of the GrayscaleBitmap.
void
clip(
x,
y,
width,
height,
metadataOnly?): GrayscaleBitmap;
Creates a new GrayscaleBitmap with a fragment of the image.
number
The X coordinate of the clipping rectangle.
number
The Y coordinate of the clipping rectangle.
number
The width of the clipping rectangle.
number
The height of the clipping rectangle.
boolean
Specifies whether to copy the image metadata only, not actual pixel data. The default is false.
GrayscaleBitmap
A new GrayscaleBitmap with a fragment of the source image.
clip(bounds, metadataOnly?): GrayscaleBitmap;
Creates a new GrayscaleBitmap with a fragment of the image.
Clipping rectangle of the source image to be extracted as a new GrayscaleBitmap.
boolean
Specifies whether to copy the image metadata only, not actual pixel data. The default is false.
GrayscaleBitmap
A new GrayscaleBitmap with a fragment of the source image.
clone(metadataOnly?): GrayscaleBitmap;
Creates a new GrayscaleBitmap with a copy of the image.
boolean
specifies whether to copy the image metadata only, not actual pixel data.
GrayscaleBitmap
A new instance of the GrayscaleBitmap.
free(): void;
Detaches the object from the ObjectManager and deallocates its memory, if possible.
void
invertColors(): void;
Inverts the pixel colors from black to white and vice versa.
void
rebind(omTo): void;
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
void
toBitmap(): Bitmap;
Creates a Bitmap instance from the current GrayscaleBitmap.
A new instance of the Bitmap class.
toShadowBitmap(
shadowColor,
opacityFactor?,
zeroIsOpaque?): Bitmap;
Creates a semi-transparent Bitmap from the current GrayscaleBitmap. This method treats the current GrayscaleBitmap as a transparency mask, regardless of the transparencyMask property value.
The color to fill opaque pixels of the target bitmap.
number
Additional factor to scale the alpha channel.
boolean
Specifies whether zero values correspond to fully opaque (true) or fully transparent (false) pixels.
A new instance of the Bitmap class.