Firebase.AI.ImagenImageFormat

An image format for images generated by Imagen.

Summary

To specify an image format for generated images, set ImageFormat in your ImagenGenerationConfig. See the Cloud documentation for more details.

Public static functions

Jpeg(int? compressionQuality)
JPEG image format.
Png()
PNG image format.

Public static functions

Jpeg

ImagenImageFormat Firebase::AI::ImagenImageFormat::Jpeg(
  int? compressionQuality
)

JPEG image format.

Joint Photographic Experts Group (JPEG) is a lossy compression format, meaning some image data is discarded during compression. Images in JPEG format are typically larger than PNG images, though this depends on the image content and JPEG compression quality.

Details
Parameters
compressionQuality
The JPEG quality setting from 0 to 100, where 0 is highest level of compression (lowest image quality, smallest file size) and 100 is the lowest level of compression (highest image quality, largest file size); defaults to 75.

Png

ImagenImageFormat Firebase::AI::ImagenImageFormat::Png()

PNG image format.

Portable Network Graphic (PNG) is a lossless image format, meaning no image data is lost during compression. Images in PNG format are typically larger than JPEG images, though this depends on the image content and JPEG compression quality.