Sending animated GIFs with sendPhoto (Telegram bot) - telegram

I'm trying to send an animated GIF with sendPhoto (Telegram's Bot API) with this request:
https://api.telegram.org/bot<token>/sendPhoto?chat_id=<chat_id>&photo=http://i.giphy.com/13IC4LVeP5NGNi.gif
That method works, as in, I get ok:true back, but the image in the chat window is a still snapshot of the moving GIF.
How can I get the animated GIF to show? Is there another method I should use?

You should use the sendAnimation method for sending a GIF or H.264/MPEG-4 AVC video without sound. Just use the animation parameter for your GIF file.
sendPhoto is only used for static images.

use sendVideo method!
https://api.telegram.org/bot<token>/sendVideo?chat_id=<chat_id>&video=http://i.giphy.com/13IC4LVeP5NGNi.gif
this will work

Related

How to disable expanded image view in Firebase push messaging?

I'm trying to send a small image in a push notification. It looks great in the initial state
But in the expanded view, it shows a huge version of the same image which I'm trying to avoid.
How is it possible via code? Unable to find any documentation around it.

Camera Failed to capture still image with request CAMMutableStillImageCaptureRequest

I use the UIImagepickercontroller to take images. Its a custom overlay camera.
I use not the image preview.
I take multiple images and save them in a folder. And I think this is the problem.
If I multiple click on the "takePicture" button the whole time
I get this output:
[Camera] Failed to capture still image with request <CAMMutableStillImageCaptureRequest burstIdentifier:(null) irisIdentifier(null)> (Error Domain=CAMCaptureControllerErrorDomain Code=-22100 "(null)")
Sometimes the app crashes. with this error:
[Camera] Attempting to generate BGRA thumbnail data of format 5003 with an invalid surface.
How can i solve this problem ?
I think you used any type of "mediaTypes" in image picker.
if you want to take picture from image picker you no need to set "mediaTypes" in image picker, only user "takePicture" method.
For me the issue was solved after deleting the app once from the device. I had given the permission for using the camera with the live app and the development app did not demand the permission again. With the complete new installation everything works fine.

How to resize Video capture in DirectShow?

I've look around in the documentation but can't find a good way to do this.
I capture video from my webcam and connect it to a ISampleGrabber filter to take screenshots. Which works fine but I would like to be able to scale the resolution on the video.
Thanks for any guidance!
Resizing in software is a relatively expensive operation, for which you also don't have an out of the box working component in DirectShow. You are typically more interested in setting proper capture resolution in first place, so that you don't need to resize.
Can't change video capture resolution using c#
Video Capture output always in 320x240 despite changing resolution
To resize video on runtime, you need either third party filter, or a custom filter, or instead copy a video from DriectShow pipeline and resize it there e.g. using StretchBlt API.
You can do the re-sizing job by manipulating the bitmaps you captured from directshow and then push them to new video file. However I generally do not recommend that .
FFmpeg already have this function integrated.
ffmpeg -i input.avi -s [width]x[height] output.avi

Apply a Filter to a Camera video stream publishing to Media Server

I am Trying to Apply some information Like text and An Image as an overlay to create a overlay effect as lice a security camera with time and date on the video along with a png based Logo.
I can record VIDEO Using Flex and FMS or any other Media Server. But I want to save a modified version of the stream being uploaded.
Use camTwist (mac) or webcammax (pc) as your video input...you can use that program to use the webcam and then add whatever over it (text, date). Use Flash Media Live Encoder and select camTwist as your video source. Stream and save your recordings using that FMLE.
Sorenson Squeeze is pretty awesome for this and is cross platform. Camtwist is cool but it's not really a 'pro' app, that makes me sound way snobbish. It's actually pretty fun and a good suggestion for a simple result but I haven't found anything better than Sorenson Squeeze for the features and control it gives you.

How to edit images using javascript in real time and save the edited image on the server?

Is it possible to edit images using a javascript library and then send the edited image to the server for saving.
Edits will be in real time, means the user can see the edit result in the same time he is editing without the need to refresh the page.
I want a javascript library to do some edits on an image on a webpage 'such as crop, resize, rotate,...' and send send the edited result to the server.
How this can be done or if there any smart work around to something like this.
The libraries mentioned don't seem to be fully cross browser. As far as I know there is no fully cross browser compliant way to edit pixel data on the client.
The current best approach would be to do these manipulations on the server. You can still do this real time using a web service.
As an example see the image editor in TinyMCE which supports crop, rotate, resize, flip, all from the client without a page refresh.
Pixastic is an image manipulation library; once you've modified the image, some sort of post back / upload call from the script will be able to upload the image provided you've implemented the needed functionality to do so.
An incomplete list to be sure, but these are two that come to mind which allow you do a wide variety of editing on the client side and push back to the server.
PIxastic
AIE
And there are numerous less complete image editing tools for simply cropping or adjusting contrast as well.
jcrop is what you are looking for .

Resources