Tdesktop: Large webp files

Created on 21 Jul 2020  路  19Comments  路  Source: telegramdesktop/tdesktop

Filing this as a bug report since it breaks previous expected behavior despite that I believe the change was made intentionally.

Changing the desktop client so large webp are not fully seen has the undesired behavior of breaking some functionalities exploited in the past. For instance, the speakers of a language called Toki Pona communicate through a bot using webp files (for instance, this is a public group https://t.me/sitelenponataso ). They have to do this since the symbols are not recognized in Unicode yet.

Now that webp is not displayed fully the user experience is highly deteriorated

Most helpful comment

The issue is not fixed. Every sticker sent via sendSticker appears as a file. All other clients are fine and show the actual sticker.

All 19 comments

Why not just change the bot to produce 512px images? :thinking:
A lot of people want normal webp photos...

@ilya-fedin how does it work? do they have to be 512x512 exactly? I'm asking it because there are images that are smaller and are not being displayed normally.

The problem with the images is that now they are not displayed fully but they look like a file, and it is needed to click the "open with" button

do they have to be 512x512 exactly?

yes (or have a stickerpack)
https://github.com/telegramdesktop/tdesktop/commit/8aafe6ba0e5d98f75236869231819a22760ec0eb

@damaru2 They should have one side of 512 and the other less or equal to 512, then they鈥檒l be shown as stickers.

A sticker pack is not an option, since they are generated with the users sentences each time they write.

I guess there are good reasons for changing this, but the previous all-images-render-approach was working fine for users (it still works like that on android). If it is not possible to give the user the option to render other image sizes I guess I'll have to adapt and try to make the user aware of the space limitations. This option is not so bad. Thank you both @ilya-fedin and @john-preston.

One question, why not showing all images with both sides <= 512 as stickers?? It would be much more convenient in my case at least (most messages in sticker format will be like this) and I guess it would be virtually the same on your side relating the issues why this change was introduced (I presume you were trying to avoid slow rendering when working with larger images). So if you could allow images of sizes (x,y) for x,y <=512 to render as stickers, that would be great.

I presume you were trying to avoid slow rendering when working with larger images

images posted e.g. from google images were displayed as stickers previously

images posted e.g. from google images were displayed as stickers previously

But now all webp images (but the ones with that other specific format) are shown in the same way as images sent as files are, instead of as regular images that can be seen without clicking the open button. That is inconvenient for all users, not just in my case. I bet users would like this kind of images to be displayed as regular images, not like files (this just meaning with no need to press an open button, regardless of the under the hood implementation. Ofc, understanding that maybe large webp should have the current format similarly to file images). Right?

are shown in the same way as images sent as files are

at least they can be scaled now

But why not allow to display small images directly? Right now every webp file has to be opened by clicking the open button + there is this other inconvenient thing that is that if you system has a default program to open webp files, that external application opens instead of telegram rendering the image (e.g. I just tried to download one of these images and I didn't have a default app for opening webp so I used chrome and now every time I click on opening it is opened with chrome. I'm on Xubunut)

now every time I click on opening it is opened with chrome

webps from your group opens internally in tdesktop for me. I'm on NixOS with MATE. 2.1.20 beta.

They did for me as well, but do you have a default app for webp? I downloaded one, and after trying to open it and set up a default app, they started to open on that app (chrome)

They did for me as well, but do you have a default app for webp?

Yes, I have GIMP

Ok, I don't know why that could be. But anyway, if the problem is scaling, I believe showing the images with that format (with the open button) only in bad cases would be optimal. Some rescaling was being done before and I guess the only problem with the rescaling is that for larger images things would be seen very small. Note the android client still does this rescaling https://i.imgur.com/OKl7aoa.png Why not allowing small images to be shown as before? (actually at this point I would be happy just with images with both sides <=512px to be rescaled and shown as stickers as before (or shown in any other way that does not require to actively open the image) )

I can confirm this issue. My bot sends a custom sticker that is not from a stickerpack and its displayed as a file instead of a sticker. The dimensions of the image are 320 x 350, so pretty normal

I can confirm this issue too. There are plenty of bots that send .webp with sendSticker method and the documentation doesn't specify any restrictions.
Anyway, now we have inconsistency with other platforms.

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!

The issue is not fixed. Every sticker sent via sendSticker appears as a file. All other clients are fine and show the actual sticker.

@damaru2 They should have one side of 512 and the other less or equal to 512, then they鈥檒l be shown as stickers.

I suggest, resizing all webp images, that are not from a sticker pack, to fit 512x or x512
same as What Android and iOS client does

however by clicking on these webp images,
they enlarge and show in Telegram photo viewer,
like what happens with jpg images

most of webp images sent these years, didn't follow 512x or x512 pixel size,
that @Stickers want for png sent for Sticker packs

As a result, webp images, sent from Gboard on Android or iOS
appear different from what iOS and Android Client shows them
which break similarity of Clients

Also single Emoji size of Telegram Desktop, is half size of Android Client emoji(in pixels), which could be same

Was this page helpful?
0 / 5 - 0 ratings