Expand description
The validation and the conversion of images.
Structs§
- Converted
- The image that the model sees, and the size of the upright original.
- Header
- The size of an image, in pixels.
Enums§
- Convert
Error - An image that the conversion cannot take.
- Header
Error - An image that the API cannot take as it is.
Constants§
- PNG_
SIGNATURE - The first eight bytes of each PNG file.
Functions§
- convert
- Converts an image into the limits of the API.
- decode
- Decodes an image, with its pixels upright by its EXIF orientation.
- encode
- Scales an image into the limits of the API, and encodes it.
- fitted_
size - Returns the size that fits the limits of the API, with the same aspect ratio.
- read_
header - Reads the size of a PNG or JPEG image, and validates the image.