GrayImage class
An gray scaled image, each byte is a gray value in(0~255)
- Inheritance
-
- Object
- AbstractImage
- GrayImage
Constructors
- GrayImage(dynamic width, dynamic height)
- GrayImage.raw(Uint8List data, {required int width, required int height})
Properties
- buffer → Uint8List
-
the gray data, each element is a gray pixel (0-255)
no setter
- bytePerPixel → int
-
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
no setteroverride
-
pixels
→ List<
int> -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → int
-
no setteroverride
Methods
-
binaryzation(
{int middle = 0x80}) → void - binaryzation this image
-
clip(
int newWidth, int newHeight, [int offsetX = 0, int offsetY = 0]) → void -
override
-
copy(
) → GrayImage -
copy and return a new GrayImage
override
-
deNoise(
{int middle = 0x80, int disparity = 0x20}) → int - Remove noise
-
drawRect(
Rect rect, Color color, [BlendMode mode = BlendMode.srcOver]) → void -
override
-
getChannel(
int x, int y, [ImageChannel? channel]) → int -
get the gray value(0-255) at Point(x, y).
channel
is ignoredoverride -
getChannelSafe(
int x, int y, [int? defaultValue, ImageChannel? channel]) → int -
get the gray value(0-255) at Point(x, y) without exception.
channel
is ignoredoverride -
getColor(
int x, int y) → Color -
override
-
getColorSafe(
int x, int y, [Color? defaultColor = const Color(0x00ffffff)]) → Color -
override
-
getImage(
) → Future< Image> -
Get the
Image
Object from this image -
getOffset(
int x, int y) → int -
inherited
-
inverse(
) → void -
inverse phase
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resize(
double ratio) → void -
override
-
resizeTo(
int newWidth, int newHeight, [SampleMode sample = SampleMode.nearest]) → void -
override
-
rotate(
double radian, {SampleMode sample = SampleMode.bilinear, int bgColor = 255, bool isClip = false}) → void -
override
-
scaleDown(
double scale) → void -
use for zoom out an image
override
-
setChannel(
int x, int y, int value, [ImageChannel? channel]) → void -
set the gray value(0-255) at Point(x, y).
channel
is ignoredoverride -
setChannelSafe(
int x, int y, int value, [ImageChannel? channel]) → void -
set the gray value(0-255) at Point(x, y) without exception.
channel
is ignoredoverride -
setColor(
int x, int y, Color color, [GrayScale? grayScale]) → void -
set
color
(will be grayscale) at Point(x
,y
)override -
setColorSafe(
int x, int y, Color color) → void -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited