What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-02 06:28:03
python ocr pdf dataframe
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe" import pandas as pd from PIL import Image import pytesseract import io from wand.image import Image as wand pd.set_option('max_colwidth', 2000) pd.opti... Add solution -
Other 2021-09-30 17:23:04
display pil image on kivy canvas
from kivy.core.image import Image as CoreImage from kivy.uix.image import Image as kiImage from PIL import Image, ImageDraw, ImageFont from io import BytesIO canvas_img = Image.new('RGB', (240, 120), color=(255, 255, 255)) (do stuff to canvas_img) data =... Add solution -
Python 2021-09-29 02:56:02
find all color in image python
>>> from PIL import Image >>> im = Image.open('polar-bear-cub.jpg') >>> from collections import defaultdict >>> by_color = defaultdict(int) >>> for pixel in im.getdata(): ... by_color[pixel] += 1 >>&g... Add solution -
Python 2021-09-24 17:33:03
replace transparent pixels python
from PIL import Image img = Image.open('img.png') img = img.convert("RGBA") datas = img.getdata() newData = [] for item in datas: if item[0] == 255 and item[1] == 255 and item[2] == 255: newData.append((255, 255, 255, 0)) # This is... Add solution -
Python 2021-09-24 01:04:04
make a gif with images python
from PIL import Image import glob # Create the frames frames = [] imgs = glob.glob("*.png") for i in imgs: new_frame = Image.open(i) frames.append(new_frame) # Save into a GIF file th... Add solution -
Python 2021-09-21 08:55:04
background image in python
om tkinter import * from PIL import ImageTk canvas = Canvas(width=600, height=800, bg='blue') canvas.pack(expand=YES, fill=BOTH) image = ImageTk.PhotoImage(file="File route") canvas.create_image(10, 10, image=image, anchor=NW) mainloop() Add solution
Best helpers
Ranking is empty