Class Image (1.38.0)

Image(image_bytes: bytes)

Image.

Methods

Image

Image(image_bytes: bytes)

Creates an Image object.

Parameter
NameDescription
image_bytes bytes

Image file bytes. Image can be in PNG or JPEG format.

load_from_file

load_from_file(location: str) -> vertexai.vision_models.Image

Loads image from file.

Parameter
NameDescription
location str

Local path from where to load the image.

save

save(location: str)

Saves image to a file.

Parameter
NameDescription
location str

Local path where to save the image.

show

show()

Shows the image.

This method only works when in a notebook environment.