Image constructor

Image(
  1. {required int width,
  2. required int height,
  3. Format format = Format.uint8,
  4. int numChannels = 3,
  5. bool withPalette = false,
  6. Format paletteFormat = Format.uint8,
  7. Palette? palette,
  8. ExifData? exif,
  9. IccProfile? iccp,
  10. Map<String, String>? textData,
  11. int loopCount = 0,
  12. FrameType frameType = FrameType.sequence,
  13. Color? backgroundColor,
  14. int frameDuration = 0,
  15. int frameIndex = 0}
)

Creates an image with the given dimensions and format.

Implementation

Image(
    {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,
    this.textData,
    this.loopCount = 0,
    this.frameType = FrameType.sequence,
    this.backgroundColor,
    this.frameDuration = 0,
    this.frameIndex = 0}) {
  frames.add(this);
  _initialize(width, height,
      format: format,
      numChannels: numChannels,
      withPalette: withPalette,
      paletteFormat: paletteFormat,
      palette: palette,
      exif: exif,
      iccp: iccp);
}