gramjs
gramjs copied to clipboard
Trying to get channel image
I got the dialog from client.getDialogs()
and in dialog.entity.photo.strippedThumb
I have Buffer, I tried to convert it to image via
But got only white square, though channel has image.
Thanks in advance.
I don't necessarily need to get the photo via strippedThumb, the main thing is to not have a lot of requests to telegram.
the stripped thumb property is like 1kb at best and won't have much info.
you can use strippedPhotoToJpg
to convert it to an image.
import { strippedPhotoToJpg } from "telegram/Utils";
Yes, you're right. What I got is just a blurry nothing. If I use downloadProfilePhoto, won't that make a lot of requests? If it does, what's the best way to do it?