Closed BhasherBEL closed 3 months ago
Thanks for the contribution but I don't think we should make this configurable as we would run into config creep if we do this with every change (unless we have a better configuration abstraction layer) how does the change look like and does it make sense to change this for all users?
I think it makes sense to retain the aspect ratio by default. When sending a screenshot often times important information is not visible in the chat and I worry the other person might not bother the open the image (since they don't know that I highlighted something at the top or bottom for example). This is also how all the messanger apps I've used so far handle it.
I agree that imo this should be the default behavior, as in many apps.
For now, the feature looks a bit ugly, as it simply force the picture to fit inside the box. It could instead resize the outside borders to also match the picture.
If you agree for both, I will implement them.
If you find a solution which looks good for all possible aspect ratios of pictures, sure. The current size should then just be a max width/height
The new commit should change what we have discussed. The sizes are constraints between 100-400 for width and 100-500 for height. For most cases (i.e. "normal sizes"), the width will be 400 and the height will be adaptive.
Here is how it looks like now:
Here is how it handle extreme cases.
Doesn't seem to work yet. When I send a photo which is very wide or very high but also very thin it looks like this:
Did you use the last commit ? It's looks like the previous behavior where the box didn't scale. What happens if you use a standard picture (i.e. not extreme) ?
Did you use the last commit ? It's looks like the previous behavior where the box didn't scale. What happens if you use a standard picture (i.e. not extreme) ?
Yes this screenshot is from the newest version. The aspect ratio needs to work with all possible ratios, even with extreme ones
Did you use the last commit ? It's looks like the previous behavior where the box didn't scale. What happens if you use a standard picture (i.e. not extreme) ?
Yes this screenshot is from the newest version. The aspect ratio needs to work with all possible ratios, even with extreme ones
Definitely agree. But it's quite strange that it's still squared on your screenshot. It should never be squared again, except for real squared pictures.
Has now been implemented with a different approach. Anyway, thank you very much for the attempt
This PR add a settings to force images to keep their initial aspect ratio in chat.