Problem downloading images from ODK Central

Hello,

in few recent projects it has happened that images download from ODK central cannot be opened.
This happens either downloading the files directly from central (one by one), or downloading the whole dataset (.zip).

Trying to open it with Preview gives:
"The file “1674799383068.jpg” could not be opened. It may be damaged or use a file format that Preview doesn’t recognise."

  • It does not happens for all enumerators.
  • We also have a "signature" input which looks fine, also for the enumerator whose collected image is unreadable
  • data are hosted on Central 1.2.2

The image field is defined in the XLS form like this:
type: image
appearance: new
parameters: max-pixels=512

What can be the reason?
Does it depend on the behavior of the enumerator? (for example trying to upload a file which is not an image?)
Does it depend on the version of Collect/Central? I noticed that now images are stored as jpg, before they were png.

Thanks a lot!

Central doesn't do anything to the images, so I think this might be an issue with Collect.

Is there any pattern to the enumerators it happens with? Maybe they are using the same model of device or version of Collect?

For the bad images, what happens if you rename them to end with .png?

Thanks for the reply @yanokwa

I will try to check with the enumerators about the ODK Collect version.

Changing the ending into .png did not help.

Meanwhile, I tried to look at the jpg metadata, and found out that the phone models/camera producing bad images are

  • "MediaTek Camera Application" with either TECNO K..." (Tecno Spark), "Infinix", "M2004J19C" (Xiaomi Redmi 9), "220233L2G" (Xiaomi Redmi 10A) or
  • "samsung SM-A127F" (Galaxy A12)
    (see the screenshot)

However, files received from Samsung Galaxy A02, Tecno Camon (with MediaTek), and other Xiaomi models look good. I also looked back into previously collected data, in 2021 we had images taken with a Tecno Spark 2, and saved as png, which were readable.

This indeed suggests that the problem is with the phone.
Although I cannot say that I screened all previously collected pictures in the last couple of years, I have not seen this problem before (also with previous versions of ODK Collect).

Is there any additional test that I could ask to the enumerators and that could interfere with the image upload?

Thank you again.

Hello @yanokwa, I have an update on this issue that maybe is important also for others.

I asked enumerators to take two pictures and changed the max-pixels parameter. Apparently the problem happens with max-pixels=512, but not with max-pixels=1024.

The idea of testing this came from this sentence in the ODK docs.

Thanks a lot,

Alfonso

1 Like