detectImageType()
function detectImageType(bytes): ImageType | null;Detects PNG and JPEG by their magic bytes.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bytes |
Uint8Array |
Returns
Section titled “Returns”ImageType | null
function detectImageType(bytes): ImageType | null;Detects PNG and JPEG by their magic bytes.
| Parameter | Type |
|---|---|
bytes |
Uint8Array |
ImageType | null