ImageByteFormat

enum class ImageByteFormat
kotlin.Any
   ↳ kotlin.Enum<androidx.ui.graphics.ImageByteFormat>
   ↳ androidx.ui.graphics.ImageByteFormat

The format in which image bytes should be returned when using Image.toByteData.

Summary

Enum values

PNG format.

Raw RGBA format.

Raw unmodified format.

Enum values

png

enum val png : ImageByteFormat

PNG format.

A loss-less compression format for images. This format is well suited for images with hard edges, such as screenshots or sprites, and images with text. Transparency is supported. The PNG format supports images up to 2,147,483,647 pixels in either dimension, though in practice available memory provides a more immediate limitation on maximum image size.

PNG images normally use the .png file extension and the image/png MIME type.

See also:

  • <__>, the Wikipedia page on PNG.
  • <>, the PNG standard.

rawRgba

enum val rawRgba : ImageByteFormat

Raw RGBA format.

Unencoded bytes, in RGBA row-primary form, 8 bits per channel.

rawUnmodified

enum val rawUnmodified : ImageByteFormat

Raw unmodified format.

Unencoded bytes, in the image's existing format. For example, a grayscale image may use a single 8-bit channel for each pixel.