My question is i am using ODK for data collection and i am using a phone which has 5 MP camera and when i am taking photo it is using maximun resolution of camera. Is there any method so we can chnage size of picture.
I alredy tried with chnaging photo resolution in camera setting but it doesn't work.
Yes, I was wondering about this too and maybe it ties in with the issue I am looking at currently - https://github.com/opendatakit/collect/issues/1173. We could do something about the 2 issues at he same time possibly?
Dan i would love to do work on this. However ,I am newbies in this, i neither made any android apps nor worked on java more so i think i can't do much effort.
But still i would like to do work with you might be we both can find out solution.
Perfect this is something that I want. Ready to testing anytime, @yanokwa you are master man, i googled ODK Paper and found only your name there, one more fan has been added in your list.
Hi Stalker, we also had the same issue back then. Since the current version of ODK Collect is still not able to do that, we opted for a third-party Android app. Here's how we did it:
In the Android device, install the app called Camera FV-5 Lite which allows you to set small dimensions for images
In Camera FV-5 Lite app, set your preferred resolution
In the Android device, set Camera FV-5 Lite as the default camera app
@Stalker if you're comfortable with installing Collect from code, you can try out https://github.com/opendatakit/collect/pull/1210! There's a form AllWidgets.txt that you can use following step 3 here (change the extension to .xml first).
Otherwise, I'll write here when there's a beta available with the feature.
I resolved this problem in my own Collect fork by resizing the images before uploading them, in tasks/instanceUploaderTask - when iterating through the files to upload, check for an image filetype and if you find one, resize it down (using bitmapfactory) until it meets your size requirements.
I felt that approach was likely to be more reliable than trying to do it as part of the image acquisition process, since it happens entirely within Collect.
Nik
As of ODK Collect v1.1.10 (currently in beta), it is possible to specify a maximum size for the long edge of an image at the form level. This means different images within the same form can have different sizes as desired. This is not yet implemented in XLSForm but hopefully will be soon (https://github.com/XLSForm/pyxform/issues/137).
If you'd like to use this feature before XLSForm supports it, you can generate your form as you normally would and then edit the XML to add the size constraint.
Here is a sample form with 4 image prompts: one that's unscaled and three scaled down to long edges of 1024, 640 or 100: max-pixels.xml (1.3 KB)
As of ODK Collect v1.11, it is possible to specify the maximum size for the long edge of all images in the general settings. This setting can be hidden from admin settings. Images are resized immediately when they are taken/selected.
If a particular question in a particular form specifies a maximum size, then the application setting is ignored. For example, if I set the maximum size to 640 in the settings and then use the form below, images will be of size 1024, 777 and 100.
XLSForm still doesn't have an elegant way to specify the max pixels for an individual image. However, I just remembered that a column with name bind::orx:max-pixels can be added. See an example here that caps image sizes to 1024, 777 and 100.
Thanks @Grzesiek2010 for implementing this. Hopefully it will make uploading on slow connections a little easier.
Brilliant, that is exactly what I needed and in less than 15 mins!
Thanks everyone for your help, although it sounds like a few people have this issue. We are working in rural Tanzania and Nigeria, so upload speed can be an issue, although things are improving rapidly.