Image
The image family identifies image formats from the leading bytes of a file.
Supported formats
detect
Identifies the image format of data from its leading bytes. Returns null in
Node.js and None in Python when the format is not recognized.
The first 64 bytes of a file are enough for every image format.
Node.js
Python
DetectedFormat
A format identified by detect.
In Python, DetectedFormat is a final class with read-only properties, and the
type of each property is str.
supportedFormats
Returns the identifier of each format that detect can return.