Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2490] ImageFactory: JPEG EXIF orientation is wrongly ignored

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2021-10-19T23:48:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsImageFactory
LabelsImageFactory, android, exif, image, ios, jpeg, orientation
ReporterRene Pot
AssigneeJoshua Quick
Created2019-02-11T15:44:31.000+0000
Updated2021-10-19T23:48:16.000+0000

Description

*Summary:* All of the "ti.imagefactory" module's APIs ignore a JPEG's EXIF orientation if assigned on both Android and iOS. This typically happens with camera photos or images from the photo gallery. This causes the images generated from this module's methods such as compress(), imageAsCropped(), etc. to have the wrong orientation. *Solution:* All APIs should compensate for the JPEG's EXIF orientation and generate a new image using an upright orientation. *Note:* We could copy the EXIF orientation from the source image to the generated image, but this will only work for JPEGs and not PNGs. Our APIs support a "format" option which allows it to generate a PNG, making this not a viable solution. *Work-Around:* There is a community module "fh.imagefactory" that handles EXIF orientation, but it's for Android only. https://github.com/freshheads/fh.imagefactory

Comments

  1. Joshua Quick 2021-09-15

    PR (ti.imagefactory): https://github.com/appcelerator-modules/ti.imagefactory/pull/192
  2. Joshua Quick 2021-10-19

    Fixed in release... https://github.com/appcelerator-modules/ti.imagefactory/releases/tag/v5.1.0-android

JSON Source