Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Chrome/Firefox use EXIF orientation by default #141

Closed
mzur opened this issue May 8, 2020 · 1 comment
Closed

Chrome/Firefox use EXIF orientation by default #141

mzur opened this issue May 8, 2020 · 1 comment
Labels

Comments

@mzur
Copy link
Member

mzur commented May 8, 2020

Chrome 81 began to use the image EXIF orientation by default. This breaks the annotation tool in some cases where images were displayed (and annotated) differently before. Also the annotation tool now displays some images differently across different browsers. The developers suggest to set CSS image-orientation: none to the image and canvas elements. However, the style is only computed if the elements exist in the DOM. The elements can be hidden with visibility: hidden; position: fixed;.

The implementation in this module is not straight forward as each image has its own canvas element and neither the image element nor the canvas element are ever present in the DOM. This may be fixed by temporarily appending the elements to the DOM while the image is drawn. The same must be done with the color adjustment canvas.

References whatwg/html#4495

@mzur
Copy link
Member Author

mzur commented Jun 5, 2020

Now Firefox seems to do this as well but the fix for Chrome isn't working correctly here.

@mzur mzur reopened this Jun 5, 2020
@mzur mzur changed the title Chrome uses EXIF orientation by default Chrome/Firefox use EXIF orientation by default Jun 5, 2020
@mzur mzur closed this as completed in 4d763bf Jun 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant