DocumentServer icon indicating copy to clipboard operation
DocumentServer copied to clipboard

Bug: Image Exif data is not processed, resulting in rotated images on export

Open yamanq opened this issue 2 years ago • 1 comments

Do you want to request a feature or report a bug? Bug

What is the current behavior? Images with rotation information in the exif data are not rotated upon export. All other document processors I tested (LibreOffice, Microsoft Word) do not interpret exif data, so the image appears rotated in the document. This is also the case when exporting to PDF.

This is important because phone camera images typically rotate images using the exif metadata.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. For this demo, I have created 2 test images:

test.jpg: This is a file with no exif data.

test

Internal representation (screenshot of GIMP): image

test-rotate-with-exif.jpg: This file notates rotation using its exif data.

test-rotate-with-exif

Internal representation (screenshot of GIMP): image Also has the following exif metadata: Orientation : Rotate 90 CW

Reproduction Steps

  1. Insert both images into a docx document image
  2. Export the docx to any format (docx, pdf, odt)
  3. Open the exported file using the viewer/editor of your choice
  4. Observe screenshots below

docx opened in LibreOffice (issue also occurs in Microsoft Word): image

PDF opened with Firefox built-in pdf renderer (issue also occurs in Okular): image

What is the expected behavior? Images should be cleared of exif data and rotated by the DocumentServer. This serves 2 purposes:

  1. Fixes this issue
  2. Privacy. Documents shared with others will not include all exif data of the image, as this contains geolocation, creation date, and extensive information on the phone/camera that took the image.

Did this work in previous versions of DocumentServer? Not sure.

DocumentServer version: 7.1.1

Operating System: Linux

Browser version: Firefox 101.0

Related issue

This has the same root cause as #1192. In the example document shared there, both images contain Orientation exif data. Libreoffice and other document processors do not read this data while onlyoffice does, so it results in an incorrect orientation.

yamanq avatar Jun 17 '22 03:06 yamanq

Hello, @yamanq Thank you for report. I can confirm - this is know bug, issue 46717 in our private issue tracker.

TatianaKirillova avatar Jun 17 '22 09:06 TatianaKirillova