Does canvas ImageData have EXIF ​​information in JavaScript?

In documents

The ImageData interface represents the basic pixel data of the canvas element area

I would like to know if ImageData will only have pixel data or pixel data + metadata? Metadata means any EXIF ​​data, such as orientation, resolution, file type, or dpi.

Problem

Whenever I draw images with EXIF ​​orientations other than 1 to the canvas and read them as ImageData, the ImageData shown does not align correctly on the Image tag when I convert ImageData to DataURL.

The problem is observed in both mobile and desktop browsers in all browsers.

+5
source share
1 answer

<canvas> does not save JPEG metadata, as this metadata is specific to the JPEG file itself. Canvas, by definition, is raw pixel data.

+3
source

Source: https://habr.com/ru/post/1237183/


All Articles