Command class
Base class for commands that create, load, manipulate, and save images. Commands are not executed until either the execute or executeThread methods are called.
Constructors
- Command.new([Command? input])
Properties
- dirty ↔ bool
-
getter/setter pair
- firstSubCommand ↔ Command?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- input ↔ Command?
-
getter/setter pair
- outputBytes ↔ Uint8List?
-
Output bytes generated by the command.
getter/setter pair
- outputImage ↔ Image?
-
Output Image generated by the command.
getter/setter pair
- outputObject ↔ Object?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subCommand ↔ Command
-
getter/setter pair
Methods
-
addFrames(
int count, AddFramesFunction callback) → void - Add animation frames to an image.
-
adjustColor(
{Color? blacks, Color? whites, Color? mids, num? contrast, num? saturation, num? brightness, num? gamma, num? exposure, num? hue, num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
bakeOrientation(
) → void -
billboard(
{num grid = 10, num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
bleachBypass(
{num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
bulgeDistortion(
{int? centerX, int? centerY, num? radius, num scale = 0.5, Interpolation interpolation = Interpolation.nearest, Command? mask, Channel maskChannel = Channel.luminance}) → void -
bumpToNormal(
{num strength = 2}) → void -
chromaticAberration(
{int shift = 5, Command? mask, Channel maskChannel = Channel.luminance}) → void -
colorHalftone(
{num amount = 1, int? centerX, int? centerY, num angle = 180, num size = 5, Command? mask, Channel maskChannel = Channel.luminance}) → void -
colorOffset(
{num red = 0, num green = 0, num blue = 0, num alpha = 0, Command? mask, Channel maskChannel = Channel.luminance}) → void -
compositeImage(
Command? src, {int? dstX, int? dstY, int? dstW, int? dstH, int? srcX, int? srcY, int? srcW, int? srcH, BlendMode blend = BlendMode.alpha, bool linearBlend = false, bool center = false, Command? mask, Channel maskChannel = Channel.luminance}) → void -
contrast(
{required num contrast, Command? mask, Channel maskChannel = Channel.luminance}) → void -
convert(
{int? numChannels, Format? format, num? alpha, bool withPalette = false}) → void - Convert an image by changing its format or number of channels.
-
convolution(
{required List< num> filter, num div = 1.0, num offset = 0, num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
copy(
) → void - Create a copy of the current image.
-
copyCrop(
{required int x, required int y, required int width, required int height, num radius = 0, bool antialias = true}) → void -
copyCropCircle(
{int? radius, int? centerX, int? centerY, bool antialias = true}) → void -
copyExpandCanvas(
{int? newWidth, int? newHeight, int? padding, ExpandCanvasPosition position = ExpandCanvasPosition.center, Color? backgroundColor, Image? toImage}) → void -
copyFlip(
{required FlipDirection direction}) → void -
copyImageChannels(
{required Command? from, bool scaled = false, Channel? red, Channel? green, Channel? blue, Channel? alpha, Command? mask, Channel maskChannel = Channel.luminance}) → void -
copyRectify(
{required Point topLeft, required Point topRight, required Point bottomLeft, required Point bottomRight, Interpolation interpolation = Interpolation.nearest}) → void -
copyResize(
{int? width, int? height, bool? maintainAspect, Color? backgroundColor, Interpolation interpolation = Interpolation.nearest}) → void -
copyResizeCropSquare(
{required int size, num radius = 0, Interpolation interpolation = Interpolation.nearest, bool antialias = true}) → void -
copyRotate(
{required num angle, Interpolation interpolation = Interpolation.nearest}) → void -
createImage(
{required int width, required int height, Format format = Format.uint8, int numChannels = 3, bool withPalette = false, Format paletteFormat = Format.uint8, Palette? palette, ExifData? exif, IccProfile? iccp, Map< String, String> ? textData}) → void - Create an Image.
-
decodeBmp(
Uint8List data) → void -
decodeBmpFile(
String path) → void -
decodeExr(
Uint8List data) → void -
decodeExrFile(
String path) → void -
decodeGif(
Uint8List data) → void -
decodeGifFile(
String path) → void -
decodeIco(
Uint8List data) → void -
decodeIcoFile(
String path) → void -
decodeImage(
Uint8List data) → void -
decodeImageFile(
String path) → void -
decodeJpg(
Uint8List data) → void -
decodeJpgFile(
String path) → void -
decodeNamedImage(
String path, Uint8List data) → void -
decodePng(
Uint8List data) → void -
decodePngFile(
String path) → void -
decodePsd(
Uint8List data) → void -
decodePsdFile(
String path) → void -
decodePvr(
Uint8List data) → void -
decodePvrFile(
String path) → void -
decodeTga(
Uint8List data) → void -
decodeTgaFile(
String path) → void -
decodeTiff(
Uint8List data) → void -
decodeTiffFile(
String path) → void -
decodeWebP(
Uint8List data) → void -
decodeWebPFile(
String path) → void -
ditherImage(
{Quantizer? quantizer, DitherKernel kernel = DitherKernel.floydSteinberg, bool serpentine = false}) → void -
dotScreen(
{num angle = 180, num size = 5.75, int? centerX, int? centerY, num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
drawChar(
String char, {required BitmapFont font, required int x, required int y, Color? color, Command? mask, Channel maskChannel = Channel.luminance}) → void -
drawCircle(
{required int x, required int y, required int radius, required Color color, bool antialias = false, Command? mask, Channel maskChannel = Channel.luminance}) → void -
drawLine(
{required int x1, required int y1, required int x2, required int y2, required Color color, bool antialias = false, num thickness = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
drawPixel(
int x, int y, Color color, {BlendMode blend = BlendMode.alpha, bool linearBlend = false, Command? mask, Channel maskChannel = Channel.luminance}) → void -
drawPolygon(
{required List< Point> vertices, required Color color, Command? mask, Channel maskChannel = Channel.luminance}) → void -
drawRect(
{required int x1, required int y1, required int x2, required int y2, required Color color, num radius = 0, num thickness = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
drawString(
String string, {required BitmapFont font, int? x, int? y, Color? color, bool wrap = false, bool rightJustify = false, Command? mask, Channel maskChannel = Channel.luminance}) → void -
dropShadow(
int hShadow, int vShadow, int blur, {Color? shadowColor}) → void -
edgeGlow(
{num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
emboss(
{num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
encodeBmp(
) → void -
encodeBmpFile(
String path) → void -
encodeCur(
) → void -
encodeCurFile(
String path) → void -
encodeGif(
{int samplingFactor = 10, DitherKernel dither = DitherKernel.floydSteinberg, bool ditherSerpentine = false}) → void -
encodeGifFile(
String path, {int samplingFactor = 10, DitherKernel dither = DitherKernel.floydSteinberg, bool ditherSerpentine = false}) → void -
encodeIco(
) → void -
encodeIcoFile(
String path) → void -
encodeJpg(
{int quality = 100}) → void -
encodeJpgFile(
String path, {int quality = 100}) → void -
encodePng(
{int level = 6, PngFilter filter = PngFilter.paeth}) → void -
encodePngFile(
String path, {int level = 6, PngFilter filter = PngFilter.paeth}) → void -
encodePvr(
) → void -
encodePvrFile(
String path) → void -
encodeTga(
) → void -
encodeTgaFile(
String path) → void -
encodeTiff(
) → void -
encodeTiffFile(
String path) → void -
execute(
) → Future< Command> -
executeCommand(
) → Future< void> -
executeIfDirty(
) → Future< void> -
executeThread(
) → Future< Command> -
fill(
{required Color color, Command? mask, Channel maskChannel = Channel.luminance}) → void -
fillCircle(
{required int x, required int y, required int radius, required Color color, bool antialias = false, Command? mask, Channel maskChannel = Channel.luminance}) → void -
fillFlood(
{required int x, required int y, required Color color, num threshold = 0.0, bool compareAlpha = false, Command? mask, Channel maskChannel = Channel.luminance}) → void -
fillPolygon(
{required List< Point> vertices, required Color color, Command? mask, Channel maskChannel = Channel.luminance}) → void -
fillRect(
{required int x1, required int y1, required int x2, required int y2, required Color color, num radius = 0, Command? mask, Channel maskChannel = Channel.luminance}) → void -
filter(
FilterFunction filter) → void -
Run an arbitrary function on the image within the Command graph.
A FilterFunction is in the
form Image function(Image)
. A new Image can be returned, replacing the given Image; or the given Image can be returned. -
flip(
{required FlipDirection direction}) → void -
forEachFrame(
FilterFunction callback) → void - Call a callback for each frame of an animation.
-
gamma(
{required num gamma, Command? mask, Channel maskChannel = Channel.luminance}) → void -
gaussianBlur(
{required int radius, Command? mask, Channel maskChannel = Channel.luminance}) → void -
getBytes(
) → Future< Uint8List?> -
getBytesThread(
) → Future< Uint8List?> -
getImage(
) → Future< Image?> -
getImageThread(
) → Future< Image?> -
grayscale(
{num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
hdrToLdr(
{num? exposure}) → void -
hexagonPixelate(
{int? centerX, int? centerY, int size = 5, num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
image(
Image image) → void - Use a specific Image.
-
invert(
{Command? mask, Channel maskChannel = Channel.luminance}) → void -
luminanceThreshold(
{num threshold = 0.5, bool outputColor = false, num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
monochrome(
{Color? color, num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
noise(
num sigma, {NoiseType type = NoiseType.gaussian, Random? random, Command? mask, Channel maskChannel = Channel.luminance}) → void -
normalize(
{required num min, required num max, Command? mask, Channel maskChannel = Channel.luminance}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pixelate(
{required int size, PixelateMode mode = PixelateMode.upperLeft, Command? mask, Channel maskChannel = Channel.luminance}) → void -
quantize(
{int numberOfColors = 256, QuantizeMethod method = QuantizeMethod.neuralNet, DitherKernel dither = DitherKernel.none, bool ditherSerpentine = false}) → void -
reinhardTonemap(
{Command? mask, Channel maskChannel = Channel.luminance}) → void -
remapColors(
{Channel red = Channel.red, Channel green = Channel.green, Channel blue = Channel.blue, Channel alpha = Channel.alpha}) → void -
scaleRgba(
{required Color scale, Command? mask, Channel maskChannel = Channel.luminance}) → void -
separableConvolution(
{required SeparableKernel kernel, Command? mask, Channel maskChannel = Channel.luminance}) → void -
sepia(
{num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
setDirty(
) → void -
sketch(
{num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
smooth(
{required num weight, Command? mask, Channel maskChannel = Channel.luminance}) → void -
sobel(
{num amount = 1, Command? mask, Channel maskChannel = Channel.luminance}) → void -
stretchDistortion(
{int? centerX, int? centerY, Interpolation interpolation = Interpolation.nearest, Command? mask, Channel maskChannel = Channel.luminance}) → void -
toString(
) → String -
A string representation of this object.
inherited
-
trim(
{TrimMode mode = TrimMode.transparent, Trim sides = Trim.all}) → void -
vignette(
{num start = 0.3, num end = 0.75, Color? color, num amount = 0.8, Command? mask, Channel maskChannel = Channel.luminance}) → void -
writeToFile(
String path) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited