evilGmonkey / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 0 forks source link

add support to compress large images #308

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by yanokwa on 24 Aug 2011 at 8:58

GoogleCodeExporter commented 9 years ago
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.

Original comment by matt.ad...@radicaldynamic.com on 13 Sep 2011 at 8:29

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by mitchellsundt@gmail.com on 21 Oct 2011 at 8:24

GoogleCodeExporter commented 9 years ago

Original comment by yanokwa on 25 May 2012 at 3:46

GoogleCodeExporter commented 9 years ago

Original comment by yanokwa on 25 May 2012 at 8:13

GoogleCodeExporter commented 9 years ago
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.

Original comment by yano...@nafundi.com on 20 Mar 2013 at 7:16