ImageInfo

@JsonClass(generateAdapter = true)
data class ImageInfo(@Json(name = "mimetype") val mimeType: String?, @Json(name = "w") val width: Int = 0, @Json(name = "h") val height: Int = 0, @Json(name = "size") val size: Long = 0, @Json(name = "thumbnail_info") val thumbnailInfo: ThumbnailInfo? = null, @Json(name = "thumbnail_url") val thumbnailUrl: String? = null, @Json(name = "thumbnail_file") val thumbnailFile: EncryptedFileInfo? = null)

Constructors

Link copied to clipboard
constructor(@Json(name = "mimetype") mimeType: String?, @Json(name = "w") width: Int = 0, @Json(name = "h") height: Int = 0, @Json(name = "size") size: Long = 0, @Json(name = "thumbnail_info") thumbnailInfo: ThumbnailInfo? = null, @Json(name = "thumbnail_url") thumbnailUrl: String? = null, @Json(name = "thumbnail_file") thumbnailFile: EncryptedFileInfo? = null)

Functions

Link copied to clipboard

Get the url of the encrypted thumbnail or of the thumbnail.

Properties

Link copied to clipboard
val height: Int = 0

The intended display height of the image in pixels. This may differ from the intrinsic dimensions of the image file.

Link copied to clipboard

The mimetype of the image, e.g. "image/jpeg".

Link copied to clipboard
val size: Long = 0

Size of the image in bytes.

Link copied to clipboard

Information on the encrypted thumbnail file, as specified in End-to-end encryption. Only present if the thumbnail is encrypted.

Link copied to clipboard

Metadata about the image referred to in thumbnail_url.

Link copied to clipboard
val thumbnailUrl: String? = null

The URL (typically MXC URI) to a thumbnail of the image. Only present if the thumbnail is unencrypted.

Link copied to clipboard
val width: Int = 0

The intended display width of the image in pixels. This may differ from the intrinsic dimensions of the image file.