RightMesh / meshIM

An on- or off-line messaging app powered by RightMesh!
GNU General Public License v3.0
17 stars 8 forks source link

Allow users to set a profile picture. #21

Open FrazerSeymour opened 6 years ago

FrazerSeymour commented 6 years ago

Will need a UI for it, and the ability to store it in the DB or a ProtoBuf object.

Might be cool if we could automatically resize/compress it to avoid the "must be of size X" hurdle when selecting it, but still keep bandwidth low while sending the images around with the profile update messages.

Alternately, maybe the profile update object can either have the image or a hash of the current image, which the client can use to see if their image is out of date and request the up to date one. This is more complex but prevents sending images around when not needed, or when like just the username is being updated. Some cases would contain the image by default, like if the MeshID has never been seen before, or the user has just updated their image and is sending the first update out to everyone.

compscidr commented 6 years ago

I know Bangladesh was doing something clever on Yo! to address some of these issues - migth be worth reaching out to whoever was working on that to see if theres something usable there, or if you can at least start from whatever technique they were using.

fractalic commented 6 years ago

Is the "must be of size X" thing a minimum (or maximum) size required by... something?

FrazerSeymour commented 6 years ago

Sorry, on re-reading that it isn't really clear what I mean. By "must be of size X" I'm thinking of messages like "Sorry! Your file must be less than 2MB.". At which point the user is like "how on earth can I control for that on my cell phone", and they rage-uninstall our app.

I'm imaging we're going to want to keep file-size to a minimum (at least when broadcasting/storing), and that a way of doing that would be to apply compression and resize their image to be no bigger than whatever size we display it at in the app.