Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support to compress large images #309

Closed
mitchellsundt opened this issue Jul 9, 2015 · 5 comments
Closed

add support to compress large images #309

mitchellsundt opened this issue Jul 9, 2015 · 5 comments

Comments

@mitchellsundt
Copy link
Contributor

mitchellsundt commented Jul 9, 2015

Migrated to getodk/collect#42 by spacetelescope/github-issues-import

Originally reported on Google Code with ID 308

as android devices continue to ship with better cameras, we are sending pictures that
are unnecessarily huge. 

there is no easy way to do this in the intent (especially with 1.5/1.6 support), so
in the submission activity, we should likely compress before we send. 

it's not clear if this should be a form or device setting.

Reported by yanokwa on 2011-08-24 20:58:24

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#42 (comment) by spacetelescope/github-issues-import

With http://groupcomplete.com, we resize captured images so that they fit within 1024x768.
 This was a necessity for us since shipping around 2-3Mb+ images is impractical.  We
also downgraded the image quality somewhat but not enough to impact overall image integrity.

Attached is a patch against 2a190d8613ca that does just this.  It works on 2.2+ (might
work on 2.1 but I have not verified).  The only caveat is that phones with a smaller
app heap might run out of memory resizing larger photos.

Turning this into a preference is left as an exercise for the reader.

For maximum flexibility, I would suggest implementing this as a set of form image attributes
that would "request" maximum image dimensions as well as quality level.

If the device image capture preferences are set to "auto" the form hints would be used.
 Otherwise, the device image capture preferences would override and supply an image
of a different dimension and quality.

The form hints could be displayed on the image capture screen with easy access to adjust
the image capture settings on a per-image basis or perhaps simply redirect to the device
image capture preferences.

Actually, this is useful enough that we might end up implementing it ourselves.

Reported by matt.adams@radicaldynamic.com on 2011-09-13 20:29:04


- _Attachment: [capture_images_at_1024x768_75quality.diff](https://storage.googleapis.com/google-code-attachments/opendatakit/issue-308/comment-1/capture_images_at_1024x768_75quality.diff)_

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#42 (comment) by spacetelescope/github-issues-import

Reported by mitchellsundt on 2011-10-21 20:24:28

  • Labels added: Collect

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#42 (comment) by spacetelescope/github-issues-import

Reported by yanokwa on 2012-05-25 15:46:40

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#42 (comment) by spacetelescope/github-issues-import

Reported by yanokwa on 2012-05-25 20:13:11

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#42 (comment) by spacetelescope/github-issues-import

The Android devices I checked all have some way to resize the picture size inside the
Camera app itself, so I think that's the best way to go.

Reported by yanokwa@nafundi.com on 2013-03-20 19:16:22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants