Variables

bg:Color

Default color for this bitmap background. It's used in some operations like copy/clone as default background color in some cases.

@:readOnlycolor:Colors

Color related utilities like channel filters, blend, etc.

@:readOnlydata:Bytes

image bitmap Raw bytes in RGBA int32 format.

@:readOnlydraw:Draw

Drawing utilities.

@:readOnlyio:BitmapIO

Utilities to load/save bitmaps from/to other formats or resources, such as base64 dataUrls, raw bytes formats, HTML canvas, HTML images, DOM Blobs, TypedArrays, buffers, urls, etc.

noRangeCheck:Bool

If true operationsn won't throw exceptions in case given coordinates for get/set are outside bitmap.

@:readOnlytransform:Transform

Transform utilities like convolve, affine, etc.

Methods

clone (?fillBg:Bool):Bitmap

Returns a new bitmap that is a copy of this one with exactly the same pixels.

compare (b:Bitmap, ?regionA:Rectangle, ?thisRegion:Rectangle):Float

copyFrom (b:Bitmap, bCoords:Point, regionThis:Rectangle):Void

Writes in this bitmap given region of given bitmap, or if no region is given, the bitmap entirely.

equals (b:Bitmap, ?region:Rectangle):Bool

Returns true if this bitmap and given one are exactly equal (pixel by pixel).

fill (?bg:Color):Void

get (x:Int, y:Int, ?noError:Bool):Color

Gets pixel color at x,y.

By default if coords are out of bounds it will throw error. This can be prevented passing noError==true. In that case, if the error happens it will return true, otherwise false.

load (input:Input, ?format:PixelFormat):Void

Loads an image form given input.

save (output:Output):Void

Saves current bitmap to given output.

set (x:Int, y:Int, c:Color, ?noError:Bool):Bool

By default if coords are out of bounds it will throw error. This can be prevented passing noError==true. In that case, if the error happens it will return true, otherwise false.

Inherited Variables

Defined by OffsetRectangleArea

@:readOnlyoriginalHeight:Int

@:readOnlyoriginalWidth:Int

Defined by RectangleArea

@:readOnlyheight:Int

@:readOnlywidth:Int

Inherited Methods