telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
25.17k stars 5k forks source link

[Feature Request] Replace crop with blur #25061

Closed Neurotoxin001 closed 10 months ago

Neurotoxin001 commented 1 year ago

Is your feature request related to a problem?

Some pictures showing cropped and I must open them to fullscreen to see all content. Example: https://t.me/pul_1/6745

Cropped: image

Full: image

I think all because of new blur effect (https://github.com/telegramdesktop/tdesktop/commit/20b5138e006bb9fce0329dcdd70e09570a9e7fed or https://github.com/telegramdesktop/tdesktop/commit/00ee31ce2d4125d60593bb8a4fa20645604a8103)

Describe the solution you'd like

Replace crop for images with blur effect that was added in 4.1.2 beta. Example: image

On iOS these posts looks fine even without blur: image

Describe alternatives you've considered

No

Additional context

No response

Laiteux commented 1 year ago

Yep.

Noticed the same here with friends who also updated to 4.1.2 beta:

Telegram_m2On6HgSUa

While on 4.1.1:

image

Very annoying and imo a regression if this was done on purpose. The black bars were super useful and a lot better.

I would guess it is 00ee31ce2d4125d60593bb8a4fa20645604a8103 which introduced this? Haven't looked much deeper so it might be an other commit. If you wanna try and find it by yourself: https://github.com/telegramdesktop/tdesktop/compare/v4.1.1...v4.1.2

Can we get any dev input on this? Hopefully this wasn't done on purpose, it is really impractical having to click on every image to see it entirely.

Neurotoxin001 commented 1 year ago

I think this is also https://github.com/telegramdesktop/tdesktop/commit/20b5138e006bb9fce0329dcdd70e09570a9e7fed

Laiteux commented 1 year ago

Why would a commit supposed to introduce side blur also remove top and bottom black bars, forcing the media to be zoomed in?

Was this done on purpose or is it a mistake / omission?

If not happy with the black bars, couldn't these also be replaced by blur then, just like the side blur effect we now have?

Laiteux commented 1 year ago

Very good job with the side blur effect while we're at it, I think this was really needed! No more multi-line captions even for small ones (:

Neurotoxin001 commented 1 year ago

On iOS we have blur also, but I never seen black bars or crop here

image

Neurotoxin001 commented 1 year ago

Very good job with the side blur effect while we're at it, I think this was really needed! No more multi-line captions even for small ones (:

Yes, blur is fine, but not crop

Laiteux commented 1 year ago

Black bars were for horizontal media on desktop, before 4.1.2 beta.

You're right, it looks like iOS already had a blur effect for horizontal media as well!

Would be very nice having the same on desktop. I guess this is just an omission from the devs then, and hopefully nothing to worry about 😄

Laiteux commented 1 year ago

Actually, it looks like it also is a thing on tdesktop.

Telegram_2zuXK2JGXn

And this is how it looks on iOS:

image

Confused as to why it sometimes is cropped (zoomed in) on desktop then. I would guess it depends on the width/height ratio?

john-preston commented 1 year ago

Now the width of the media depends on the caption to let it fit in. If the blurred lines on sides happen to be too thin the media is zoomed instead. This happens if less than 0.25 of the photo is cropped.

You can see the same thing with video files with captions on mobile.

Neurotoxin001 commented 1 year ago

You can see the same thing with video files with captions on mobile.

I can't remember photos being cropped on iOS. Video - yes, maybe, but not a photo.

Neurotoxin001 commented 1 year ago

This happens if less than 0.25 of the photo is cropped.

On iOS even that little area with blur, not crop: image

https://t.me/dvachannel/101437

And it looks much better than if it was zoomed and cropped.

Laiteux commented 1 year ago

An other example as to why this is a bad thing: My friends now all have to click on a picture if they want to be able to read what's written.

Telegram_JdCJPhcfSQ

Neurotoxin001 commented 1 year ago

Really... https://t.me/topor/22901

image image

Neurotoxin001 commented 1 year ago

Really... There is so much text. And it's still cropped.

image image

https://t.me/c/1237513492/35902 (https://t.me/+mXumAD42hYpkOWUy)

Neurotoxin001 commented 1 year ago

Press play on it https://t.me/kepka_support/124050

It's cropped even when playing. Users must open it in full screen to see all content.

Neurotoxin001 commented 1 year ago

No answers about these ridiculous examples above? They not cropped on iOS / webZ.

Photos is not cropping on iOS. Only videos. Because it's looking bad for photos.

Neurotoxin001 commented 1 year ago

This is literally CRINGE. I can't write posts like this:

Long text

Shortest text

https://user-images.githubusercontent.com/39812401/190914317-d300adc2-fb9d-4e3e-9b80-915c7a67ed6e.mp4

Laiteux commented 1 year ago

I think they understood. Sending multiple messages a day will never help with getting a faster response.

Neurotoxin001 commented 1 year ago

I think they understood. Sending multiple messages a day will never help with getting a faster response.

I just showing more examples...

Neurotoxin001 commented 1 year ago

image

https://t.me/dvachannel/101673

Neurotoxin001 commented 1 year ago

Thanks ❗️❗️❗️

Laiteux commented 1 year ago

❤️‍🔥

john-preston commented 1 year ago

Ok, I hope this way it'll be better.

The photos now should not crop:

For vertical crop - now they should either become larger vertically (if it was going to be cropped before) or be like before with blurred sides.

For horizontal crop - just allow blurred top and bottom strips even if they're very thin, I don't think very thin horizontal photos are frequently used.

But the videos are cropped as before (because having blurred strips on videos is not CPU friendly at all, so I try to use them only for very thin videos).

john-preston commented 1 year ago

Maybe videos could be allowed to have 3x2 aspect ratio with max width as well (as was done for photos) then they'll be less cropped (cropped as well sometimes, but not that frequently).

Laiteux commented 1 year ago

Amazing, thanks a lot!

About videos... Maybe you could keep them cropped, and only allow GIFs to always be full size (uncropped)?

The reasoning behind this would be that GIFs do not have sound, and therefore, unlike videos, do not require you to click on them to show them full-sized and with sound.

Since videos require you to click on them to watch them with sound, it would make sense. However, GIFs do not have sound and therefore could be shown full-size by default anyway.

GIFs are also very often used to demonstrate something on a computer, or just to make a cool video loop, and Telegram even offers a GIF library natively. Therefore, I think it would make sense to have them uncropped.

After all, GIFs are just photo frames put together, so maybe they should behave just like photos (:

Yeah, videos are also photo frames put together and with an audio track on top, but let's not get too political. Or maybe just do both, after all?

Laiteux commented 1 year ago

@john-preston I'm not really sure about how GitHub notifications behave when an issue is closed, so I'll ping you this one time just to make sure you see this. (:

john-preston commented 1 year ago

After all, GIFs are just photo frames put together, so maybe they should behave just like photos (:

The videos (and GIFs) are cropped in more cases than left with blurred background because blurring the auto-playing videos (= GIFs) is very CPU-consuming and I'd like to do that less often. I've allowed the height of videos / GIFs to expand 33% more, but if the video has a long caption (so that full available width is used) and the height is more than width 1.33 it still will be cropped.. until it won't, if the height is more than width 2, in that case we'll show blurred strips on the sides.

Neurotoxin001 commented 1 year ago

I think now videos is too big.

Example: https://t.me/dvachannel/102079

4.2.1 beta: image

3.5.2: image

It's with 125% interface scale

Neurotoxin001 commented 1 year ago

Same with photos https://t.me/c/1460007515/63487 (https://t.me/+fG_afcLq6t5lYTFi)

4.2.1 beta: image

3.5.2: image

I think with blur it would be better

Neurotoxin001 commented 1 year ago

New example: https://t.me/po_memes/9604

It's not enlarged and stay cropped. https://user-images.githubusercontent.com/39812401/195060141-a29d3284-29dd-4ed2-b119-9e3610c157db.png

On iOS it's have blurred borders.

Neurotoxin001 commented 1 year ago

Another example: https://t.me/jolymemes/16281

image

Text is cropped

john-preston commented 1 year ago

@Neurotoxin001 The last examples are without captions so it’s some different case. I’ll look into that.

Neurotoxin001 commented 1 year ago

With caption: https://t.me/retra/17475 image

Neurotoxin001 commented 1 year ago

Btw, on iOS with autoplay videos don't even adds blur if their cropped. It's just play while cropped.

image image

Example: https://t.me/dvachannel/105382

Neurotoxin001 commented 1 year ago

The last examples are without captions so it’s some different case. I’ll look into that.

@john-preston Should I create new ticket to improve that change or you can reopen this? For example in Gram64 client (https://github.com/TDesktop-x64/tdesktop) posts that I mentioned above have blurred borders and it's look fine. Btw I tested autoplay for videos with blurred borders and they eating CPU just like videos without blurred borders - ~10-11% usage.

1616 2022-11-16 11-33-04-762 1618 2022-11-16 11-33-13-898

Neurotoxin001 commented 1 year ago

Another strange example: https://t.me/chtddd/57815 image

image

Small video become very large and cropped without blur

john-preston commented 1 year ago

You can create. I don't have time for those right now and the captions are better visible now which I believe is an improvement. Maybe some more improvements are necessary.

Neurotoxin001 commented 1 year ago

Can you reopen this issue and look at it when you have time to do so?

Neurotoxin001 commented 1 year ago

Another with caption: https://t.me/memeblogteam/936 image

Neurotoxin001 commented 10 months ago

I haven't seen a buggy images/gif in almost a year, so I think we can close it.