You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stumble up on something abnormal behavior when i tried to copy a jpeg with exif rotation and reading it from the clipboard api.
First of all, when i read the image then I always got a png file even doe i had copied a jpeg file.
I can see from this paragraph that jpg/jpeg should be whitelisted. So why don't i get the original jpeg file back when i read it from the clipboard?
Chrome seems to convert all images into a png file? (why?) and wrongly too. it dose not rotate the image according to the exif rotation in the jpeg meta data.
And why is the file name not the same as the original file i copied? all images i copy get the name image.png?
The text was updated successfully, but these errors were encountered:
This repository concerns the w3c clipboard specification, which applies to all browsers (ex. Chrome, Safari, Firefox, Edge, Samsung Internet, etc). Are you discussing a Chromium-specific bug? If so, please file a bug on https://crbug.com (component Blink>DataTransfer for clipboard), and we can close this issue. If this is intended to be a cross-browser spec issue, please leave this here.
Generally, browsers will sanitize clipboard contents to prevent security issues (ex. remote code execution vulnerabilities in image encoders), so sites can't expect clipboard contents to have be completely preserved/identical after copying/pasting. One unfortunate side effect of this is that exif rotation and other metadata is commonly stripped, and browser-internal formats may sometimes differ from formats used on the web (Chrome happens to prefer bitmaps/PNGs for clipboard image formats).
I stumble up on something abnormal behavior when i tried to copy a jpeg with exif rotation and reading it from the clipboard api.
First of all, when i read the image then I always got a png file even doe i had copied a jpeg file.
I can see from this paragraph that jpg/jpeg should be whitelisted. So why don't i get the original jpeg file back when i read it from the clipboard?
Chrome seems to convert all images into a png file? (why?) and wrongly too. it dose not rotate the image according to the exif rotation in the jpeg meta data.
And why is the file name not the same as the original file i copied? all images i copy get the name
image.png
?The text was updated successfully, but these errors were encountered: