Creates a Bitmap instance with optionally initialized pixels.
An object manager that controls the lifetime of the Bitmap object.
The bitmap width, in pixels.
The bitmap height, in pixels.
OptionalbackColor: Color | nullThe optional background color to fill the Bitmap.
Returns true if all pixels in the image are either black or white.
Gets the current BmpContext for this Bitmap.
Determines whether the image contains only opaque grayscale pixels.
Gets the height of the bitmap, in pixels.
Gets the reference to the object.
Gets the owner ObjectManager instance.
Gets the width of the bitmap, in pixels.
Creates a bitmap with glow effect from the current image. The glow effect inflates all non-transparent areas of an image by a specified amount, then applies a Gaussian blur to make the border smooth. The effect appears only if some pixels of the current image are transparent or semi-transparent.
The glow color.
OptionalglowOpacity: number = 0.8The glow opacity, between 0 and 1.
OptionalinflationRadius: number = 6The glow inflation radius, in pixels.
OptionalgaussianBlurRadius: number = 9The Gaussian blur radius, in pixels.
A new Bitmap with glow effect.
Creates a bitmap with shadow from the current image. The shadow appears only if some pixels of the current image are transparent or semi-transparent.
The horizontal offset of the shadow, in pixels.
The vertical offset of the shadow, in pixels.
The shadow color.
OptionalshadowOpacity: number = 0.6The shadow opacity, between 0 and 1.
OptionalgaussianBlurRadius: number = 9The shadow blur radius, in pixels.
A new Bitmap with shadow.
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).
Draws the source bitmap with the specified opacity into the current Bitmap.
The Bitmap with the source color data to draw.
The x-coordinate of the destination rectangle, in pixels.
The y-coordinate of the destination rectangle, in pixels.
Optionaloptions: AlphaBlendOptionsThe alpha blend options.
Applies a bi-level transparency mask to the current image or its portion.
A BilevelBitmap with the transparency mask.
Optionalbounds: Bounds | nullThe target rectangle of the bitmap.
Applies the in-place effect that converts a monochromatic (grayscale) image to bi-level image using Bradley and Roth's method of adaptive image thresholding.
OptionalsDivider: number = 8A divider of the image width to calculate the value of s.
Optionalt: number = 15The value of t parameter.
Optionalbounds: Bounds | nullApplies the in-place effect that updates the image brightness and contrast.
A value from -255 to 255 for adjusting the brightness level.
A value from -255 to 255 for adjusting the contrast level.
Optionalbounds: Bounds | nullApplies the in-place effect that converts a monochromatic (grayscale) image to bi-level image with two-dimensional error diffusion dithering.
OptionalditheringMethod: DitheringMethodThe method of two-dimensional error diffusion dithering. The default is Floyd-Steinberg method.
Optionalbounds: Bounds | nullApplies the in-place effect that applies a Gaussian blur to the image.
Optionalradius: number = 9The radius of the blur, in pixels.
OptionalborderMode: GaussianBlurBorderMode | nullThe mapping mode for the pixels outside of the border, "RepeatEdge" if null.
OptionalborderColor: Color | nullThe color used to blend with the edge pixels of the image, "Transparent" if null.
Optionalbounds: Bounds | nullApplies the in-place effect that converts an image to monochromatic gray.
Optionalstandard: GrayscaleStandardA grayscale standard used for converting full-color image to monochromatic gray.
Optionalbounds: Bounds | nullApplies a grayscale transparency mask to the current image or its portion.
A GrayscaleBitmap with the transparency mask.
Optionalbounds: Bounds | nullThe target rectangle of the bitmap.
Applies the in-place effect that adjusts the opacity of an image by multiplying the alpha channel of the input by the specified opacity value.
The multiplier to the input image's alpha channel. The minimum value is 0.0 and the maximum value is 1.0.
Optionalbounds: Bounds | nullApplies a soft edges effect to the current image. The soft edges effect deflates all non-transparent areas of an image by a specified amount, then applies a Gaussian blur to make the border smooth.
OptionalinflationRadius: number = -6The negative radius of inflation, in pixels.
OptionalgaussianBlurRadius: number = 9The Gaussian blur radius, in pixels.
Applies the in-place effect that alters the temperature and tint of an image.
Specifies how much to increase or decrease the temperature of the input image. The allowed range is between -1.0 and 1.0.
Specifies how much to increase or decrease the tint of the input image. The allowed range is between -1.0 and 1.0.
Optionalbounds: Bounds | nullModifies R, G, B color intensities such that the maximum range of values (0..255) is fully covered.
OptionalkeepRelativeIntensities: boolean = trueIndicates if the method should keep the relative intensities of the color channels unchanged.
OptionallowClipFraction: number = 0.002The fraction of extremely low values to be clipped, not greater than 0.1.
OptionalhighClipFraction: number = 0.002The fraction of extremely high values to be clipped, not greater than 0.1.
Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source bitmap into the current Bitmap.
The Bitmap with the source color data to transfer.
The x-coordinate of the destination rectangle, in pixels.
The y-coordinate of the destination rectangle, in pixels.
Optionaloptions: BitBltOptionsThe source coordinates, size, and other options.
Applies the algorithms of Porter Duff compositing and blending to the current Bitmap (used as backdrop, destination) and the source Bitmap.
The Bitmap with the source color data to composite.
The x-coordinate of the destination rectangle, in pixels.
The y-coordinate of the destination rectangle, in pixels.
Optionaloptions: CompositeAndBlendOptionsThe compositing and blending options.
Copies data from one color channel of the current Bitmap to an existing GrayscaleBitmap of the same pixel size.
The target GrayscaleBitmap.
A channel of the source Bitmap to be exported.
Produces a flipped (horizontal or vertical) and/or rotated (by 90 degree increments) bitmap. The source Bitmap remains unchanged.
The operation to be applied.
OptionalclipBounds: Bounds | nullClipping rectangle specifying the area of the source image to be processed.
A new Bitmap with transformed image.
Detaches the object from the ObjectManager and deallocates its memory, if possible.
Determines whether the image contains transparent or semitransparent pixels.
Optionalbounds: Bounds | nullThe source rectangle to analyse.
true if at least one non-opaque pixel was found, false otherwise.
Copies data from a GrayscaleBitmap to one color channel of the current Bitmap of the same pixel size.
A GrayscaleBitmap with source data.
A channel of the destination Bitmap to be updated.
Creates a BmpContext for the current Bitmap and optionally fills it with a background color.
OptionalbmpContextProperties: BmpContextPropertiesThe settings for creating a DrawingContext for Bitmap.
An instance of BmpContext.
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
Creates a new Bitmap with a resized image fragment. The source Bitmap remains unchanged.
The resizing options.
A new Bitmap with resized image.
Saves the Bitmap as an array with JPEG-encoded image data.
Optionalquality: number = 90The image quality from 0 (best compression) to 100 (best quality).
A byte array with JPEG-encoded image data.
Saves the Bitmap as an array with PNG-encoded image data.
Optionalfastest: boolean = falseif true, forces the operation to work as fast as possible at the expence of lower compression ratio.
A byte array with PNG-encoded image data.
Creates a BilevelBitmap from the current Bitmap. This method does not perform any transformations of the color palette. It is expected that the source Bitmap has already been converted to bi-level palette using some thresholding or dithering effects. The toBilevelBitmap method just copies data from a specified color channel to a new instance of the BilevelBitmap class.
OptionalcolorChannel: ColorChannelThe color channel used as the source of the bi-level data.
OptionallowerBitsFirst: boolean = falseIf true, pixels are arranged within a byte such that pixels with lower column indices are stored in the lower-order bits of the byte.
OptionalwhiteIsZero: boolean = falseIf true, indicates that 0 represents white and 1 represents black in the resulting BilevelBitmap.
A new instance of BilevelBitmap.
Creates a GrayscaleBitmap from the current Bitmap. This method does not perform any transformations of the color palette. It is expected that the source Bitmap has already been converted to grayscale palette using the Bitmap#applyGrayscaleEffect or something like that. Alternatively, you can use this method to extract individual channels of a color image without any prior conversion, and treat the resulting GrayscaleBitmap simply as a representation of some image data with 8 bits per pixel. The toGrayscaleBitmap method just copies data from a specified color channel to a new instance of the GrayscaleBitmap class.
OptionalcolorChannel: ColorChannelThe color channel used as the source of grayscale data.
OptionalwhiteIsZero: boolean = falseIf true, indicates that 0 represents white and 255 represents black in the resulting GrayscaleBitmap.
A new instance of GrayscaleBitmap.
Represents an uncompressed in-memory bitmap.