8

From the Docs

ImageData interface represents the underlying pixel data of an area of a canvas element

I would like to know does ImageData will have only pixel data or pixel data + meta data? Meta data means any EXIF data like orientation, resolution, file type or dpi.

Problem

Whenever I draw images with EXIF Orientation other than 1 to canvas and read it back as ImageData, the resulted ImageData is not properly aligning on Image tag when I am converting ImageData to DataURL.

Issue is observed both in mobile as well as desktop browsers all most all browsers.

Mikko Ohtamaa
  • 76,495
  • 46
  • 227
  • 378
Ganesh K
  • 2,575
  • 8
  • 48
  • 75

1 Answers1

6

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

Community
  • 1
  • 1
Mikko Ohtamaa
  • 76,495
  • 46
  • 227
  • 378