ImageGeneratioConfigs class

Configuration settings for image generation.

ImageGeneratioConfigs holds various configuration options that affect how images are generated.

Constructors

ImageGeneratioConfigs({bool captureOnlyBackgroundImageArea = true, bool allowEmptyEditCompletion = true, bool generateInsideSeparateThread = true, bool generateImageInBackground = !kIsWeb || !kDebugMode, bool captureOnlyDrawingBounds = true, bool awaitLoadingDialogContext = false, double? customPixelRatio, int pngLevel = 6, PngFilter pngFilter = PngFilter.none, bool singleFrame = false, int jpegQuality = 100, JpegChroma jpegChroma = JpegChroma.yuv444, OutputFormat outputFormat = OutputFormat.jpg, ProcessorConfigs processorConfigs = const ProcessorConfigs(), Size maxOutputSize = const Size(2000, 2000), Size maxThumbnailSize = const Size(100, 100)})
Creates a new instance of ImageGeneratioConfigs.
const

Properties

allowEmptyEditCompletion bool
Whether the callback onImageEditingComplete call with empty editing.
final
awaitLoadingDialogContext bool
This option is only required when using packages such as Asuka that display dialogs without context. When enabled, it ensures that the loading dialog's context is generated properly to prevent internal issues.
final
captureOnlyBackgroundImageArea bool
Indicates if it should only capture the background image area and cut all stuff outside, such as when a layer overlaps the image.
final
captureOnlyDrawingBounds bool
Determines whether to capture only the content within the boundaries of the painting when editing is complete.
final
customPixelRatio double?
The pixel ratio of the image relative to the content.
final
generateImageInBackground bool
Captures the final image after each change, such as adding a layer. This significantly speeds up the editor because in most cases, the image is already created when the user presses "done".
final
generateInsideSeparateThread bool
Allows image generation to run in an isolated thread, preventing any impact on the UI. On web platforms, this will run in a separate web worker.
final
hashCode int
The hash code for this object.
no setterinherited
jpegChroma JpegChroma
Specifies the chroma subsampling method for JPEG images. It defines the compression ratio for chrominance components.
final
jpegQuality int
Specifies the quality level for JPEG images. It ranges from 1 to 100, where 1 indicates the lowest quality and 100 indicates the highest quality.
final
maxOutputSize Size
The maximum output size for the image. It will maintain the image's aspect ratio but will fit within the specified constraints, similar to BoxFit.contain.
final
maxThumbnailSize Size
The maximum output size for the thumbnail image. It will maintain the image's aspect ratio but will fit within the specified constraints, similar to BoxFit.contain.
final
outputFormat OutputFormat
Specifies the output format for the generated image.
final
pngFilter PngFilter
Specifies the filter method for optimizing PNG compression. It determines how scanline filtering is applied.
final
pngLevel int
Specifies the compression level for PNG images. It ranges from 0 to 9, where 0 indicates no compression and 9 indicates maximum compression.
final
processorConfigs ProcessorConfigs
Configuration settings for the processor.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
singleFrame bool
Specifies whether single frame generation is enabled for the output formats PNG, TIFF, CUR, PVR, and ICO. The default value is false.
final

Methods

copyWith({bool? captureOnlyBackgroundImageArea, bool? allowEmptyEditCompletion, bool? generateInsideSeparateThread, bool? generateImageInBackground, bool? captureOnlyDrawingBounds, bool? awaitLoadingDialogContext, double? customPixelRatio, ProcessorConfigs? processorConfigs, OutputFormat? outputFormat, bool? singleFrame, int? pngLevel, PngFilter? pngFilter, int? jpegQuality, Size? maxOutputSize, Size? maxThumbnailSize, JpegChroma? jpegChroma}) ImageGeneratioConfigs
Creates a copy of this object with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited