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

Resulting attachment size differs from selected PREFERRED SIZE #174

Closed mikewilburn closed 5 years ago

mikewilburn commented 5 years ago

When attaching a new image, the PREFERRED SIZE menu permits downsampling the image size to save file space and allow for faster sync times:

image

However, this size appears to be getting ignored and instead honoring 3x scale factor.

For instance, when specifying a size of Medium (480x640), the resulting image size being uploaded is actually 1440x1920.

mikewilburn commented 5 years ago

In the latest version of Collector for iOS, I confirmed that their selected sizes are consistent with what's listed in the iOS API ref here.

A size 'Large' does upload an image of size of 960x1280, however they've removed these discrete size definitions from the corresponding settings menu: image

esreli commented 5 years ago

The SDK downsamples images respecting the main screen's scale. There are a few options available to us to better express to our users what is happening under the hood of the SDK:

  1. Specify points, rather than pixels, in the preferred size options table.
  2. Write a multiplier for the preferred size options relative to screen scale, outputting in the preferred size options table with the actual down-sample size in pixels.
  3. Down-sample the image ourself. (This should be considered last.)

Thoughts? @mikewilburn

esreli commented 5 years ago

Adding label Type - Enhancement and removing Type - Bug because this behavior is as designed. This does not deny the need to address this concern and merits an examination of how this can be more easily understood.

mikewilburn commented 5 years ago

My preference would be for number 2 above.

I think the attached file size should be consistent with what's listed in the preferred size options table and the API documentation. This would achieve that.

As well, I don't think an end user should have to consider a scale factor when attaching images. It should be handled behind the scenes, either by the app's logic, or by the API itself (more ideal).

esreli commented 5 years ago

This changes has been implemented. Please confirm this issue can be closed.

mikewilburn commented 5 years ago

Changes confirmed in branch v.next.

On an iPhone X (which has a 3x scale factor), the new preferred sizes are: image