ImagenAspectRatio

classImagenAspectRatio


Represents the aspect ratio that the generated image should conform to.

Summary

Public companion properties

ImagenAspectRatio

A landscape image in 16:9, the aspect ratio of modern monitors and phone screens.

ImagenAspectRatio

A landscape image in 4:3, the aspect ratio of older TVs.

ImagenAspectRatio

A portrait image in 3:4, the aspect ratio of older TVs.

ImagenAspectRatio

A portrait image in 9:16, the aspect ratio of modern monitors and phone screens.

ImagenAspectRatio

A square image, useful for icons, profile pictures, etc.

Public companion properties

LANDSCAPE_16x9

val LANDSCAPE_16x9ImagenAspectRatio

A landscape image in 16:9, the aspect ratio of modern monitors and phone screens.

LANDSCAPE_4x3

val LANDSCAPE_4x3ImagenAspectRatio

A landscape image in 4:3, the aspect ratio of older TVs.

PORTRAIT_3x4

val PORTRAIT_3x4ImagenAspectRatio

A portrait image in 3:4, the aspect ratio of older TVs.

PORTRAIT_9x16

val PORTRAIT_9x16ImagenAspectRatio

A portrait image in 9:16, the aspect ratio of modern monitors and phone screens.

SQUARE_1x1

val SQUARE_1x1ImagenAspectRatio

A square image, useful for icons, profile pictures, etc.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-09 UTC.