Use of Rotation meta data in images
Posted: 02 Aug 2015 15:19
Proposal: FamilyHistorian should make use of the EXIF Orientation metadata that can be held against certain types of images, such as .JPG and rotate the resulting image accordingly wherever the end-user sees an image, such as in thumbnails, reports and diagrams.
Background:
1. See forum item rotating pictures (11341).
2. Digital cameras with orientation detection may set an item "Orientation" in the EXIF metadata to say which way up the camera was when the image was taken. After upload to a PC, etc., image viewers with the ability to use this EXIF Orientation metadata will rotate the image on screen so that the image is the right way up. For instance, a tall gravestone may have been photographed with the camera on its side. By default, the image will be shown on the PC, etc., in landscape format and the gravestone will appear on its side. If the viewer uses the EXIF Orientation metadata, it will rotate the image on screen so that the image is displayed in portrait format and the gravestone appears the right way up.
3. Certain image editors of lesser abilities can rotate images permanently by swapping the pixels around. However, this is not ideal since it requires that the image be uncompressed, rotated and recompressed - with .JPG and other "lossy" compression routines, each uncompression / recompression cycle like this loses image data. By contrast, altering the EXIF Orientation metadata can be done without uncompression / recompression and so without data loss.
Benefits:
Currently users taking digital photos of objects like gravestones in portrait format using an orientation detection camera may find that these gravestones appear in landscape formats in reports. If FH uses the EXIF Orientation, the image will appear correctly. One current alternative is to use a permanent rotation with its resultant loss of data quality. This should avoid that.
Limitations:
1. The image can be displayed from FH using the "Open in Editor/Player" option. In my current Windows 7 set-up (at least) this display is done using the Windows Photo Viewer, which does not use the EXIF Orientation. I do not suggest any change to this behaviour.
2. When photographing documents on a desk-top, the camera may be pointing down and the orientation detection value may be problematic and so auto-rotation according to the EXIF Orientation may actually be counter productive.
Possible solutions to issue above:
Limitation 2 above may result in images of landscape pages from books being rotated according to the (problematic) EXIF Orientation and thus appearing incorrectly in portrait form. There are two possible solutions to this:
- Correct the EXIF Orientation value in an editor that understands these values - such as the software provided by the camera manufacturer;
- Provide a new data item on each Multimedia record in FH to say "Ignore the EXIF Orientation value" and print / display as now.
Background:
1. See forum item rotating pictures (11341).
2. Digital cameras with orientation detection may set an item "Orientation" in the EXIF metadata to say which way up the camera was when the image was taken. After upload to a PC, etc., image viewers with the ability to use this EXIF Orientation metadata will rotate the image on screen so that the image is the right way up. For instance, a tall gravestone may have been photographed with the camera on its side. By default, the image will be shown on the PC, etc., in landscape format and the gravestone will appear on its side. If the viewer uses the EXIF Orientation metadata, it will rotate the image on screen so that the image is displayed in portrait format and the gravestone appears the right way up.
3. Certain image editors of lesser abilities can rotate images permanently by swapping the pixels around. However, this is not ideal since it requires that the image be uncompressed, rotated and recompressed - with .JPG and other "lossy" compression routines, each uncompression / recompression cycle like this loses image data. By contrast, altering the EXIF Orientation metadata can be done without uncompression / recompression and so without data loss.
Benefits:
Currently users taking digital photos of objects like gravestones in portrait format using an orientation detection camera may find that these gravestones appear in landscape formats in reports. If FH uses the EXIF Orientation, the image will appear correctly. One current alternative is to use a permanent rotation with its resultant loss of data quality. This should avoid that.
Limitations:
1. The image can be displayed from FH using the "Open in Editor/Player" option. In my current Windows 7 set-up (at least) this display is done using the Windows Photo Viewer, which does not use the EXIF Orientation. I do not suggest any change to this behaviour.
2. When photographing documents on a desk-top, the camera may be pointing down and the orientation detection value may be problematic and so auto-rotation according to the EXIF Orientation may actually be counter productive.
Possible solutions to issue above:
Limitation 2 above may result in images of landscape pages from books being rotated according to the (problematic) EXIF Orientation and thus appearing incorrectly in portrait form. There are two possible solutions to this:
- Correct the EXIF Orientation value in an editor that understands these values - such as the software provided by the camera manufacturer;
- Provide a new data item on each Multimedia record in FH to say "Ignore the EXIF Orientation value" and print / display as now.