gif

Get a Gif File from URL and Send It via a Discord Bot

Get a Gif File from URL and Send It via a Discord Bot Question: I cannot figure out how to get this to work (maybe I’m just bad at programming). As the name suggests, I want to send an gif image with my Discord bot when I say “!radar”. The gif is located at https://radar.weather.gov/ridge/standard/CONUS_0.gif …

Total answers: 2

Take snapshots of Youtube videos to create a preview GIF programatically

Take snapshots of Youtube videos to create a preview GIF programatically Question: I use the Youtube API to integrate content into my site. But, it doesn’t provide any good snapshots of the videos. It provides a few very low quality snapshots that are virtually unusable. https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg https://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg https://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg For example: https://img.youtube.com/vi/XdwaASKJGxo/1.jpg creates the following: …

Total answers: 3

PyQt5 : QMovie is truncated even after resizing

PyQt5 : QMovie is truncated even after resizing Question: I am adding a gif to my QMainWindow. I want the size of my window to match exactly the size of QMovie but my QMovie is truncated at the first place and even if use resize on that, its still not showing fully. Here is the …

Total answers: 1

Convert mp4/avi to gif but the gif is very slow

Convert mp4/avi to gif but the gif is very slow Question: I use the below to convert my mp4 file to gif file. It worked fine but when I load the gif with browser or local tool, the gif is moving very slow. E.g. It was an animal moving from point A to point B, …

Total answers: 1

How do I connect two GIFs to play one after another in Python?

How do I connect two GIFs to play one after another in Python? Question: If I have two GIFs, GIF 1 being 10 seconds long and GIF 2 being 5 seconds long, is there a way to connect them so the final GIF is a total of 15 seconds long? Would I have to loop …

Total answers: 3

Python Pillow transparent gif isn't working

Python Pillow transparent gif isn't working Question: I am trying to make a gif of the following icon rotating : To attempt to achieve this I am running the following code in Python using the Pillow library : from PIL import Image, ImageDraw images = [] icon = Image.open(“cameraIcon.png”) for i in range(0, 360): images.append(icon.rotate(i)) …

Total answers: 3

Is there any way to resize a gif shape with turtle in Python?

Is there any way to resize a gif shape with turtle in Python? Question: I’m using turtle to make a little game and realized I could use image files with turtle.registershape(filename). I know you can resize the default shapes with turtle.shapesize or turtle.resizemode(“auto”) and changing pensize, but is there any way to resize a gif …

Total answers: 3

Pillow – Resizing a GIF

Pillow – Resizing a GIF Question: I have a gif that I would like to resize with pillow so that its size decreases. The current size of the gif is 2MB. I am trying to resize it so its height / width is smaller decrease its quality. With JPEG, the following piece of code is …

Total answers: 5

Previous frames not cleared when saving matplotlib animation

Previous frames not cleared when saving matplotlib animation Question: I am making a matplotlib animation in which a quiver arrow moves across the page. This cannot be achieved in the usual way (creating one Quiver object and updating it with each frame of the animation) because although there is a set_UVC method for updating the …

Total answers: 2