signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.59k stars 6.14k forks source link

Lower compression for sent pictures #672

Closed ghost closed 8 years ago

ghost commented 10 years ago

It would be nice if pictures which are sent over the data channel aren't so highly compressed.

m0jo commented 10 years ago

Why? Compressing/Decompressing doesnt use that much CPU as it would make any significant difference.

monreal commented 10 years ago

Are we talking about lossy compression?

zofrex commented 10 years ago

Here's a photo I took earlier and this is what it looked like after sending it via TextSecure. I only realised something was up when the recipient asked me where the event was - the poster isn't even readable :(

cgarrett commented 10 years ago

I'm having this same issue. A friend sent an image with small text in it, readable on the original image, but completely obscured after he sent it to me.

wx0b commented 10 years ago

This has been an issue for quite a while for me. I use TextSecure for SMS, but have to disable it and use the stock app for MMS due to the heavy compression.

I sent a 1.3MB image to a friend, it gets compressed to 70kB when he receives it, unencrypted, encrypted, sent, received... all gets compressed

Here is an album with screenshots of closeups, original file, and version sent/received from textsecure

ghost commented 10 years ago

I meant the compression of the picture itself, not the client server compression (didn't know that tectsecure also compresses the transfer). As the others explained the pictures are pixelated once sent/received. People are used to get compressed pictures (WhatsApp), but the picture should be compressed in a moderate way.

lapseofreason commented 10 years ago

+1 for higher resolution images, although in my opinion it's not a high priority feature

phime42 commented 10 years ago

currently experiencing the same problem, making sharing of text pages not enjoyable

hunleyd commented 10 years ago

+1

mcginty commented 10 years ago

Yeah, TextSecure does seem to do some excessive resizing/compression before sending. This is especially not required in the push case.

tinloaf commented 10 years ago

So @moxie0 what would the maximum size of pictures be that you would "allow" on the server? After all, you are currently providing the storage space for them...

jeremymasters commented 10 years ago

+1 on this as well for me. it's actually much worse than I thought after examining a photo last night. Wasn't there discussion on raising the limit of an attachment size if sent over push/data?

moxie0 commented 10 years ago

There is a 'media' branch here that handles this correctly, we just need a few things from @mcginty on it.

thenktor commented 10 years ago

@shmartens : other messengers like WhatsApp also reduce the size of the picture. This actually is a good feature because mobile data plans are sometimes very limited. The problem with TextSecure (compared to WhatsApp) is that:

  1. The image resolution is even lower. It seems to be just 360x480, which is very low for today's usual 4"-5" smartphone displays.
  2. The used algorithm for resizing seems to be low end
KayuHD commented 10 years ago

What about an option to set the picture size, like Threema do this? Not everyone has a very limited data plan (5GB per month).

zofrex commented 10 years ago

It's not unreasonable to resize the image, even though I have a large plan there's very little value in sending my photos at full resolution - it takes a lot longer as well as eating data, and in most cases the image will only be viewed on a phone screen so preserving the original res doesn't add anything.

The resizing algorithm does seem to be a bit worse than WhatsApp - their images are much higher quality but not much larger in bytes. Here's the results from my very unscientific testing with a sample size of one:

Service Resolution File size Subjective quality
Original 2448 x 3264 2 253 kB 5/5
TextSecure 360 x 480 88 kB 1/5
WhatsApp 612 x 816 100 kB 3/5
MMS 435 x 580 145 kB 1/5

For what my $0.02 are worth, I don't think an option to change the size is that useful - as long as it doesn't use huge amounts of data and doesn't look terrible, I don't really care and don't think most people would.

wx0b commented 10 years ago

I prefer that my images are not manipulated. The stock MMS app does not resize my pics (that I am aware of.) Why would I want textsecure to do that? If I want them resized, I will resize them before sending them.

KayuHD commented 10 years ago

@zofrex With size I mean the resolution, because the current is too low. All pictures with text in it are waste. When the compression is good enough without artifacts, should it be all right for me.

zofrex commented 10 years ago

@wx0b MMS apps typically compress images very harshly (even my feature phones did this), I've updated my results with the stock Messaging app to my table.

thenktor commented 10 years ago

@wx0b Manual resizing of pictures before sending them is the most uncomfortable thing I can imagine in a mobile messenger app. It needs at least twice the time in a point, shoot and send situation. Also common users even have no idea how to do it. I'd rather add another option "Send picture (uncompressed)" to the attachment menu. But also on the receiver side I would not want my app to autmatically download uncompressed images and waste my limited data plan.

@KayuHD Currently pictures with text in it are not the only problem. A usual wide anglöe picture with some details looks horrible, too. IMHO a resolution of 1024x768 with a better resizing algorithm would be a good compromise :)

generalmanager commented 10 years ago

The only legitimate use for an "send uncompressed" option is something like Pixelknot: https://guardianproject.info/apps/pixelknot/ We could make this accessible by long-clicking an image before the message is sent. This way it doesn't add clutter to the UI and the functionality is still there.

As newer phones have full HD screens we might consider something like 1280*x as the size of the compressed image. But I'm no expert in image compression, so I don't know where the sweet spot between file size and image quality is nowadays.

thenktor commented 10 years ago

I guess it's somewhere in between 1024_x and 1280_x ;)

KayuHD commented 10 years ago

My wish is at least 1024*x, but changable resolutions, like 640, 1024, 1600 or 2600 in the options would be very nice.

generalmanager commented 10 years ago

We should try to keep the UI clutter and number of settings as low as possible. Personally I would like to have this option too. Bu in order to keep TS slim I vote for either 1024 or 1280 as default and if the user needs to send the original image without any changes, he can long click on the image to do so.

KayuHD commented 10 years ago

Yeah, better leave it simple. I vote also for at least 1024*x.

thenktor commented 10 years ago

:+1:

jeremymasters commented 10 years ago

Just make sure it's the long side of the pic that is 1024 or whatever. I've seen other software forget to look at longest side and the results for rotated pictures are disappointing.

KayuHD commented 10 years ago

@jeremymasters :+1:

SlappyHours commented 10 years ago

Since this is quality vs. traffic, I would vote for 1280 (longest side) which means HD 1280x720 for an 16:9 image.

jbaker6953 commented 10 years ago

This bug is extra annoying because TextSecure even resizes and compresses incoming images. This is the single reason I have to disable TextSecure as the default messaging app, so it won't intercept and destroy my images.

agrajaghh commented 10 years ago

I got several complains from my friends as well, the image resolution is definitely too low. But the problem could be that bigger images take more space and need more traffic, so they cost money....

jbaker6953 commented 10 years ago

There is no problem with bigger images. The stock Android messaging app does not alter images as TextSecure does. As it stands, TextSecure is fundamentally impaired in comparison. The pictures from TextSecure are so small on my screen that I often can't even see what it is the sender is trying to show me. As far as I know there is no workaround when receiving messages from other TextSecure users. There is no reason for TextSecure to do anything to MMS attachments other than send them as I attach them.

agrajaghh commented 10 years ago

@jbaker6953 I was talking about push messages. I'm not using MMS.

edit: btw this issue is about sent images over the data channel, perhaps you should open another issue if TextSecure compresses incoming MMS images in comparison to the standard MMS app.

Bastelbursche commented 10 years ago

There is a media branch with a commit to allow larger media transmissions since march. But it seems not finished.

https://github.com/WhisperSystems/TextSecure/commit/d3568cadff2a3827cd2fb63ae599674ae86ffc27

thenktor commented 10 years ago

Hopefully hihjer resolution pictures get in main branch soon. My few TextSecure contacts already are using Threema again for sending pictures because quality is so much better there :(

piratenpanda commented 10 years ago

Same here, would love to use TextSecure 100% but I'm currently using threema for sending pictures at the moment.

Bastelbursche commented 10 years ago

@piratenpanda Meanwhile TextSecure sends pictures with a resolution of 1280x960 and good quality.

piratenpanda commented 10 years ago

Still, why no preview and download in full resolution when the user wants it? That's the way threema does it and it seems fine to me.

thenktor commented 10 years ago

@Bastelbursche thanks for the info, I did not even notice because nobody has sent me a picture since this was changed :)

bconway commented 10 years ago

Has this bug been fixed? I don't remember pictures at 1280x960 the last time I used TextSecure.

piratenpanda commented 10 years ago

Yes, images are currently 1280xX

thenktor commented 10 years ago

Yes, probably you and your friends need to update to latest version.

jeremymasters commented 10 years ago

So should this bug be closed then?

mcginty commented 10 years ago

Some recent MMS fixes have us making better use of the tiny space available to us (300kb on most carriers), so yeah the 1280px max dimension increase and less compression has helped.

I'm going to keep this issue open though since I agree we should be sending full-sized images via push and that is not yet implemented, which is what the issue is originally referring to.

thenktor commented 10 years ago

@mcginty The original issue was: "It would be nice if pictures which are sent over the data channel aren't so highly compressed." So there is nothing about full-sized pictures. And I don't think full-sized photos should be send via push because with nowadays 13 MP cameras on smartphones sending can take ages and easily eat up the data plan.

generalmanager commented 10 years ago

@thenktor There's a difference between full size (=full resolution) and uncompressed. Obviously sending all pictures uncompressed at full resolution can eat up a lot of valuable mobile data. And only sending the uncompressed images if the device is on wifi doesn't help the receiving device(s) either. Thus I think having the option to send images uncompressed at full resolution should not be the default behaviour either on wifi or mobile data. But there are cases in which maximum image quality is neccessary, which is why I'd like to see the long-press solution I mentioned earlier. Increasing the default resolution on wifi to maybe 1920*x when on wifi could be interesting, but I agree that a messaging app should not be optimized for high quality picture sharing, but lightweight and uncomplicated message transport and storage.

jeremymasters commented 10 years ago

I like the idea of long-press option for full-size but 1280x960 seems pretty good for regular mms pictures. The trick is, does the receiver want to potentially get data chewed up or take up space on their device if it has a small amount of storage.

mcginty commented 9 years ago

I misspoke. When I meant full-size, I mean more like a size that will actually occupy an entire modern cellphone display (>≈1920x1080), not necessarily sending raw 41MP shots or whatever.

Since we won't be constrained to 300kb in push messages, we can have much less aggressive compression, so this won't be a problem when we get the media changes in for push, which is in the works.

BlacklightShining commented 9 years ago

As a user, realizing the image I sent had been downsized was an unpleasant surprise. I would rather media not be lossly compressed at all. Just let the TS network reject it if it's too big (so we don't have to wait for specific client updates to raise the limit), and maybe provide a quick way to open it in an editor so I can resize it myself. (Generous limits on file size would also be nice.)

its4everyone commented 9 years ago

This is definitely an issue for me as well. Textra is currently my default texting application due to this setting alone. It renders any pictures I send/receive nearly useless, especially if there is some important/pertinent text contained within.