ImagenFormat class final

Represents the image format and compression quality.

Annotations
  • @Deprecated('All Imagen models are deprecated and will shut down as early as June 2026. ' 'As a replacement, you can migrate your apps to use Gemini Image models (the ' '"Nano Banana" models)(https://firebase.google.com/docs/ai-logic/imagen-models-migration).')

Constructors

ImagenFormat(String mimeType, int? compressionQuality)
ImagenFormat.jpeg({int? compressionQuality})
ImagenFormat.png()

Properties

compressionQuality int?
The level of compression if the output type is "image/jpeg". Accepted values are 0 through 100. The default value is 75.
final
hashCode int
The hash code for this object.
no setterinherited
mimeType String
The MIME type of the image format. The default value is "image/png".
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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