ImagenImageFormat

@PublicPreviewAPI
class ImagenImageFormat


Represents the format an image should be returned in.

Summary

Public companion functions

ImagenImageFormat
jpeg(compressionQuality: Int?)

An ImagenImageFormat representing a JPEG image.

ImagenImageFormat
png()

An ImagenImageFormat representing a PNG image

Public properties

Int?

an int (1-100) representing the quality of the image; a lower number means the image is permitted to be lower quality to reduce size.

String

A string (like "image/jpeg") specifying the encoding MIME type of the image.

Public companion functions

jpeg

fun jpeg(compressionQuality: Int? = null): ImagenImageFormat

An ImagenImageFormat representing a JPEG image.

Parameters
compressionQuality: Int? = null

an int (1-100) representing the quality of the image; a lower number means the image is permitted to be lower quality to reduce size.

png

fun png(): ImagenImageFormat

An ImagenImageFormat representing a PNG image

Public properties

compressionQuality

val compressionQualityInt?

an int (1-100) representing the quality of the image; a lower number means the image is permitted to be lower quality to reduce size. This parameter is not relevant for every MIME type.

mimeType

val mimeTypeString

A string (like "image/jpeg") specifying the encoding MIME type of the image.