graviti.file.image#

Graviti image file class.

Module Contents#

Classes#

Image

This class represents local image files.

RemoteImage

This class represents remote image files.

class graviti.file.image.Image(path)[source]#

Bases: graviti.file.base.File

This class represents local image files.

Parameters

path (graviti.utility.PathLike) – The local path of the image.

property height(self)[source]#

Get the height of the image.

Returns

The height of the image.

Return type

int

property width(self)[source]#

Get the width of the image.

Returns

The width of the image.

Return type

int

class graviti.file.image.RemoteImage(key, extension, size, height, width, object_permission_manager)[source]#

Bases: graviti.file.base.RemoteFile

This class represents remote image files.

Parameters
  • key (str) – The key of the image file.

  • extension (str) – The extension of the image file.

  • size (int) – The size of the image file.

  • height (int) – The height of the image.

  • width (int) – The width of the image.

  • object_permission_manager (graviti.manager.ObjectPermissionManager) – The permission to access the file.

property height(self)[source]#

Get the height of the image.

Returns

The height of the image.

Return type

int

property width(self)[source]#

Get the width of the image.

Returns

The width of the image.

Return type

int