Tdesktop: Received photos are smaller than in Telegram Web

Created on 1 Jul 2016  Â·  34Comments  Â·  Source: telegramdesktop/tdesktop

I have a bot that sends photos to users. Those photos are sent as regular photos, not files.

The photos have a resolution of 1600x1200. Telegram Web shows the photos at the original size, but Telegram Desktop receives them at a resolution of 1280x960, with a very very ugly rescaling method.

bug

Most helpful comment

@john-preston
What do you think about option that would enable largest possible image downloads? We can switch it off by default.

Also, at least tdesktop should download the best available quality when user saves images manually.

All 34 comments

Hey there!

We're automatically closing this issue since there was no activity in this issue since 361 days ago. We therefore assume that the user has lost interest or resolved the problem on their own. Closed issues that remain inactive for a long period may get automatically locked.

Don't worry though; if this is in error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

(Please note that this is an automated comment.)

@auchri I guess it should be reopened, if @wodim tried to recreate the issue.

Should be reopened. Photo quality in Telegram Desktop is worse than in Telegram for macOS. Photos are sent in size 1920, but are downsized on the client side.

I understand the importance of having a clean bug tracker but closing issues automatically is a mistake. This bug still exists

@r0mko Telegram Web issues should not be reported here

@wodim could you provide an example? Maybe you can make a channel and forward a message causing this issue into it?

@stek29 I've mistaken. In fact I meant Telegram Desktop. Telegram Web does not suffer from this issue.

@stek29 I can provide photo examples

https://t.me/resiz

Look at the picture from Telegram Web and then Telegram Desktop. Focus on the text.

If I download the picture, it has a dimension of 1280x960 (both Telegram Desktop and Telegram Web).

Right click and then "View Image".

image

@auchri Telegram Web photo quality depends on your screen resoltion. On a 4K diaplay it opens in 1600x1200

Fun fact: If I download the picture using the Android-App, it also has a dimension of 1280x960.

On my mobile it also looks fine, with no artifacts from resizing.

On Sun, Dec 3, 2017 at 1:49 PM, r0mko notifications@github.com wrote:

@auchri https://github.com/auchri Telegram Web photo quality depends on
your screen resoltion. On a 4K diaplay it opens in 1600x1200

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/telegramdesktop/tdesktop/issues/2206#issuecomment-348764055,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA9IUbCGw3F44aRJrX62cQhJjgMYlopwks5s8pjMgaJpZM4JCsXk
.

I don't care that much about the resolution, but this is awful.

image

@auchri this is also a known issue of the Android App. iOS app renders files in largest available resolution

@wodim @auchri compare this https://t.me/tg_photo_quality_test

Telegram Desktop:
image
Telegram Web/Telegram for macOS:
image
The difference is obvious

@r0mko Yes, looks like web version uses larger images :( tdesktop uses single image size for displaying the photo in the message history and in the photo viewer, and it is not the maximum available size, so that message history would load fast enough.

@john-preston
But why same images look much worse when you open them in photo viewer from a bot/channel in tdesktop? In comparison to when you open in chat with a person or yourself. The image size is the same for me in both cases (1280x960).

Steps to reproduce:

  1. Join https://t.me/resiz, compare the text in image visually from Telegram Desktop vs Telegram Web (or iOS). The text looks very uneven on edges. Forward this channel's message with the image to yourself.
  2. Download that image from the place where it looks better, like Telegram Web.
  3. Send that image to yourself (with compression)
  4. In your Saved messages, compare the images side by side clicking on viewer arrows, look at the text. It's very different. Wouldn't the pictures look pretty much the same at this point, if it was just the global "single image size" that caused the problem?

Why Telegram Desktop renders images from bots/channels vs chats differently? It looks like some REALLY bad scaling takes place at some point. Does the image viewer differentiate between sender types somehow? What could be the variables that viewer's image rendering depending on?

It is a big issue for me, cause I send a lot of screenshots via the bot from my tv when I watch movies with subtitles.

@enchained If after sending to saved messages you clear local storage in Settings and relaunch the app - will it still be better in Saved messages.

@john-preston
After clearing and relaunching the Telegram Desktop - nothing changed - the image that was sent by myself is still looking much better than the image that was forwarded from the channel.

Noticed that, in addition to when sent via the bot API, it's reproducible by simply clicking on the preview of any image url send by any person to any chat. Looks like it uses the same compression algorithm or something. The bug is most noticeable on pictures with thin lines - lineart, anime screenshots, subtitles with an outline.

So the easiest way to reproduce follows:

  1. Find the image with thin lines over the internet
  2. Copy it's url
  3. Save the image
  4. Send the url manually to a chat
  5. Send the image (as image) manually to a chat
  6. Compare the two
  7. Compare that to any other client
  8. Bug is still there after cache reset and restart.

@john-preston

@soredake There is some tradeoffs. Currently I load not the largest image of all available to show them in the chat. After that images are instantly opened in the mediaviewer if you click on them. If we decide to load the largest one in mediaviewer it will first download an image for the chat, and after click will load even more. Another option is to load the largest image for the chat in the first place, but this will work slower.

@john-preston what about showing worse photo in media viewer at first, and then replacing it with better image?

@stek29 Size of the image in the mediaviewer is taken from the real image size. If we use size of a large image and show a small image there it will be pixelated or blurred — so we need to show loading progress (so user knows that this is not a final image, this can take some time in case of a large image)..

off-topic question

Guys, it's off-topic here, and not Tdesktop problem, but related issue, and I dunno where else to ask...
About a month ago telegram server begun to drastically reduce gifs! You sending a big one, but opponent received a small copy, like a preview. We tried tdesktop, android and web clients - all the same. Any one know what happening? Google cant answer this question. Once again sorry for offtop.

Just encountered (hopefully) same issue with latest Telegram Desktop on Linux (1.3.14).

As you can see Linux version looks much worse, probably due to nearest neighbor resampling filter being used. Is it possible to use better filter like Lanczos or at least Catmull-Rom?

i just encountered an issue where a sent image is resized to a 1280-resolution - for me it is resized in desktop, web and android-client. I'm generally no fan of resizing - i don't care if it takes longer to load, but often times a resized image is basically useless (so i'd rather wait then have something useless quickly ;) )
If speed is a big concern for others, maybe a button "load original" or something would be a compromise?

@Termuellinator You always can send original file by sending the image as a file, not s photo.

@john-preston sure, that's a workaround - but it would be much more convenient to just be able to properly view images above 1280 resolution within the client instead of downloading, browsing to the folder with the file manager and opening the image ;)
This is especially true since ctrl+mousewheel works for zooming in telegram-desktop (but is not really that useful for low-res images) :)

@john-preston
What do you think about option that would enable largest possible image downloads? We can switch it off by default.

Also, at least tdesktop should download the best available quality when user saves images manually.

Hey there!

This issue will be automatically closed in 7 days if there would be no activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

still very much an issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Liudvikas picture Liudvikas  Â·  3Comments

Yanrishatum picture Yanrishatum  Â·  3Comments

whywhyy picture whywhyy  Â·  3Comments

Justinzobel picture Justinzobel  Â·  3Comments

TheAppService picture TheAppService  Â·  3Comments