nodegin / tglib

TDLib (Telegram Database library) bindings for Node.js
114 stars 16 forks source link

Image compression? #54

Open omgitsraven opened 4 years ago

omgitsraven commented 4 years ago

So, here's a strange situation.

In the telegram desktop client, I sent myself the following file as a photo (i.e., compressed): RAW

When I look at the result in the desktop client, I see it with a small amount of compression added: COPY and if I select 'copy', I can paste a version that looks identical to the screenshot.

However, if I use tglib to download all sizes of that file, I only get two: one tiny thumbnail, and one full-sized file that looks like this: FROMNODE

which is visibly even more compressed than the version shown in the desktop client!

Is it possible that tglib is accidentally performing lossy compression when it writes these images out to disk? Because if not, does this mean that Telegram's servers don't actually report all the versions of a photo to TDlib clients?