Esri / data-collection-ios

Mobile data collection app using the iOS Runtime SDK.
https://developers.arcgis.com/
Apache License 2.0
25 stars 26 forks source link

Supports image attachment preferred content size with device screen scale #179

Closed esreli closed 5 years ago

esreli commented 5 years ago

In editing an image attachment preferred content size, up-scales output string with the device's main screen scale. This more accurately reflects the image scaling performed by the SDK.

esreli commented 5 years ago

Related issue: https://github.com/Esri/data-collection-ios/issues/174

mikewilburn commented 5 years ago

The changes introduced by this PR look good.

I confirmed on eli.preferred-size the following behaviors:

  1. The PREFERRED SIZE list accurately reflects the final resolutions to which the attached images will be downsampled. Screen scaling factors are now honored).
  2. Both portrait and landscape orientations are respected. 3:4 is the same as 4:3. Long edges are treated equivalently. i.e. a landscape image selected to be attached a resolution of 480x640 will have an uploaded resolution of 640x480, not 480x360.
  3. Images that do not have the 3:4 width-to-height ratio will be scaled to ensure they fit entirely into the selected resolution. i.e. a 16:9 image selected to be attached at a resolution of 720x960 will have an uploaded resolution of 960x540, not 720x1280.