Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile picture is distorted if not square #1779

Closed
arthurzenika opened this issue Jul 7, 2020 · 11 comments · Fixed by #3740
Closed

Profile picture is distorted if not square #1779

arthurzenika opened this issue Jul 7, 2020 · 11 comments · Fixed by #3740
Assignees
Labels
bug Something isn't working

Comments

@arthurzenika
Copy link

  • Operating System (Linux/Mac/Windows/iOS/Android): Ubuntu Focal
  • Delta Chat Version: 1.4.3 via deb packages
  • Expected behavior:

Screenshot from 2020-07-07 10-21-03

  • Actual behavior:

Screenshot from 2020-07-07 10-20-38

@arthurzenika arthurzenika added the bug Something isn't working label Jul 7, 2020
@Simon-Laux
Copy link
Member

We should make sure it is square than, maybe with a crop dialog like on android.

@gerryfrancis
Copy link
Contributor

gerryfrancis commented Jul 7, 2020

I think the image could also be cropped to a circle, that would be nice! (E.g., Github has changed avatars from squares to circles recently.)

@EchedelleLR
Copy link

EchedelleLR commented Jul 7, 2020

I think that crop to square and show it in a circle (hiding overflowed part) would be better since apps like whatsapp or similar do that allowing the picture to be showed completely when clicking on it.

With https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path set in a box (block type html tag) where the image is loaded can be set easily.

UPDATED: as you can see in the examples, the image fits a bigger part and the css property just "shows it" in the desired way. In this case, however, they applied the property directly to the image.

@EchedelleLR
Copy link

Well, maybe I misread the issue and is just being used already, the thing is that I maintain my opinion about squares are better.

@r10s
Copy link
Member

r10s commented Jul 8, 2020

We should make sure it is square than, maybe with a crop dialog like on android.

or, maybe there is some css option that does this center+crop while keeping aspect ratio? that might be the simplest solution for now. and would probably also be needed for existing images or images from other sources.

core could also force a square, however, as by the "enlarge" we do show all of the image there is some sense in keeping all details.

@EchedelleLR
Copy link

EchedelleLR commented Jul 8, 2020

or, maybe there is some css option that does this center+crop while keeping aspect ratio?

Clip-path could do something better... ?? <.<

@gerryfrancis
Copy link
Contributor

Some more information about clip-path: https://www.w3schools.com/cssref/css3_pr_clip-path.asp

@Simon-Laux
Copy link
Member

Simon-Laux commented Jul 8, 2020

@EchedelleLR
Copy link

EchedelleLR commented Jul 8, 2020

Sorry. Just think in the other idea.

@link2xt link2xt added bug Something isn't working and removed bug Something isn't working labels Aug 9, 2020
@farooqkz
Copy link
Collaborator

I can't reproduce it on 1.38.1
Maybe it has been fixed?

@Simon-Laux
Copy link
Member

Simon-Laux commented Jul 27, 2023

I can't reproduce it on 1.38.1
Maybe it has been fixed?

just tried it, I can reproduce it, you need an image that does not have 1:1 aspect ratio. I think we really need some image cropper here. (but a good one without too many dependencies)

@maxphilippov maxphilippov self-assigned this Jan 16, 2024
maxphilippov added a commit that referenced this issue Mar 31, 2024
fixes #1779

- a component to crop any image to a certain size by zooming and
  dragging the original to fit a predefined shape
- this component is used in ProfileImageSelector by altering result of
  ImageSelector upload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

8 participants