Specify image size in Telegram binding

Using the Telegram binding it is possible to specify an image which is posted along with the caption. However the image is always scaled up/down to fit the screen size - and sometimes that looks ugly.

Is it possible to specify the picture size which Telegram should use? The Telegram API seems to support this, at least there is a PhotoSize documentation. The openHAB binding can only add a URL or a base64 encoded image, but it’s not possible to specify or influence the actual picture size.

I made a small script just to do that

TimeStamp=`/bin/date '+%Y%m%d_%H%M%S_%3N'`;
justtime=`/bin/date '+%d-%m-%Y at %H:%M'`;

# Send Telegram message with image
curl -s -X POST "https://api.telegram.org/botcbbcbcbcbcbcbc9ZDaX-trtr55e55e-TRYTREW/sendPhoto?chat_id=0000000000" -F chat_id=-000000000 -F disable_notification=false -F photo="@$SnapFile4" -F caption="This image send on $justtime " 

Hope that’s not your bot uid, with just a few characters added :wink:

Ok, but by using a script you are no longer using the binding.



is not my bot uid. just overwrote a part

I an not using the binding to send images. I capture image from my camera and send them to my Telegram ID