Image resolution selector?

Firstly, it should be noted that I’m not quite a standard Android user, but use Sailfish 4 so from the inside things look mostly like Android 10/11.

Once upon a time, it was possible to send full-resolution images (the camera original on my Sony Xperia XA2 Ultra is 5312×2988) to your “note to self” section so that you easily could then retrieve them on eg. PC devices running the desktop. Then, it changed that you had to send the images via files, or they got downgraded to a lower 1600×1200 resolution. Then, even that didn’t work and unless you resorted to renaming the files to non-image file types that was the maximum resolution. With Signal 5.13.8 (86001) things are getting ridiculous, since I seem to be getting only 768×432 images through.

In the Github issue about this, @hiqua mentioned that I really should be seing a “resolution” selector (with “standard” or “high”) when sending messages, but no, I’m not getting anything like that. Here’s what the UI looks like before selecting an image and once one has been selected but before it is sent (note the image resolution).


Can you provide debug logs?

This is a log where I restart the Android subsystem and send one image via “note to self” (and it gets sent @ 432×768 pixels). At no point do I get an obvious hint at a image resolution selector UI element.

https://debuglogs.org/d1240548500f7524079074c3bdf9e4186768ae1ff984483bebf8e42236310dd1

As pointed out in a comment on the issue, the device must not be considered “low memory” for the toggle to show (isLowMemory is determined here):

Your debug log says

Memclass      : 128, low-mem device

The , low-mem device part is added here, which means activityManager.isLowRamDevice() is true for your device. VERSION.SDK_INT >= VERSION_CODES.KITKAT is also true in your case, so the device is indeed considered low memory in Util.isLowMemory, hence the toggle isn’t displayed.

That is also why you’re getting

since on “low memory” devices the default compression target is smaller:

5 Likes

Your debug log says

Memclass      : 128, low-mem device

The , low-mem device part is added here, which means activityManager.isLowRamDevice() is true for your device. VERSION.SDK_INT >= VERSION_CODES.KITKAT is also true in your case, so the device is indeed considered low memory in Util.isLowMemory , hence the toggle isn’t displayed.

Unfortunately I don’t know enough about Android development to properly understand just why the device is determined to be “low memory” (I assume VERSION.SDK_INT is a check for how recent builds we are running, but where does the MemClass come from?), and is there anything I could do about fixing this situation? I do have a connection to the Sailfish developers, and I’m pretty sure if there is something that doesn’t really rhyme with reality it could be fixed?

I’m not quite sure what would happen if we were to try to send a high-resolution image while we don’t have memory available, would we end up crashing the application or even the whole system? Or can Android devices actually swap (which would probably be fairly slow)? It should be noted that pre these (fairly recent) tests being added I’ve not suffered any issues with sending large pictures.

Since your device is not actually low-ram, I would guess it’s Sailfish’s Android subsystem goofing.

My humble guess is nothing bad would happen, and Signal is just being overly cautious.

2 Likes

I’ve now taken this up in the Sailifish OS Forum.

2 Likes

Thanks that you have done this.

1 Like

Small feedback: Signal version: 5.23.8. The problem with the low mem device still exists. But now I can use the quality selector again.

Just loaded SFOS 4.3.0.12 (Suomenlinna) and I suspect this issue has now been corrected, as a selector for photo quality showed with Signal 5.25.7 and I was able to send a 3072×2304 picture with it.

I use Signal 5.25.8 on Sailfishos 4.2.0.21 (Verla) and now the Quality selector work.