This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# animated_gif_player.py - play a BMP list like an animated gif | |
# Take an animated gif, convert it to a list of numbered BMP files. | |
# For instance, with ImageMagick you can do this with: | |
# convert anim.gif -coalesce -resize 120x120 BMP:anim-%03d.bmp | |
# This creates a set of 120x120 BMP named "anim-000.bmp", "anim-001.bmp" | |
# Copy all these files to your "ani_dir" as set below, say with: | |
# cp anim*bmp /Volumes/CIRCUITPY/ani | |
# 17 Jul 2021 - @todbot | |
import time, board | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import cv2 | |
addr = 'http://localhost:5000' | |
test_url = addr + '/api/test' | |
# prepare headers for http request | |
content_type = 'image/jpeg' | |
headers = {'content-type': content_type} |