Restricting the size of images

We have a form, made using Excel, which will allow us to take pictures and upload these to ODK aggregate. We want to restrict the size of the image file so that the overall size of the completed ODK aggregate form is not too large. We are collecting the data on an Android Galaxy Tab A.

is it best to restrict the file size on the collect form or using the settings on the tablet?

In either case how can I do this.

Thank you very much if you can help with this.

Keith

Hi Keith

This sounds like something I would be interested in implementing if it could be done from the xls.
However, the way I would advise you to do this now is from the camera settings on your camera.

Open the camera app.
Click on settings.
Click on image quality.
Select lowest resolution to shrink image size.

I will be following the thread to see if anybody else has an xls method.

Cheers

1 Like

Thank you very much for your help, that is exactly what I wanted to know. I thought there may be a way or restricting the file size on the form, as this would avoid the need to set multiple devices to low resolution. However, this is fine, it is easy to do!

Thank you for your help.

Keith

Hi @wkgray

It's already implemented in ODK Collect and you can do that in two different ways:

  1. Go to General Settings -> Form management -> Image size and choose one of the available options. Then all images you take will be affected (it requires Collect v1.11.1)

  2. If you want to specify a different size or you want to affect only one specific question you can specify the max size of the long edge of the image on a form level using: orx:max-pixels="1500" here is an example form: maxSize.xml (988 Bytes) (it required Collect v1.10.1 or newer)

Regards,
Grzegorz

3 Likes

Dear Grzegorz

Thank you for your help, I will give that a go!

Keith

Hi

I am interested in the orx:max-pixels command. How do I code an excel form to use this? I think the form you have given it in is for the XForm.

Thanks for your help

Keith

There is an example in the post at Reduce picture image while we are taking photo with ODK!

3 Likes

Brilliant. This is exactly what I needed.

Thank you so much.