Questions tagged [python-imageio]

Imageio is a Python library that provides an easy interface to read and write a wide range of image data including animated images, volumetric data, and scientific formats. Make to use this tag for question related to it.

191 questions
39
votes
2 answers

making gif from images using imageio in python

I have tried reading a lot of examples online and found imageio is the perfect package for it. Also found examples written in here. I have just followed the example as shown and tried the following import imageio as io import os file_names =…
jkhadka
  • 2,443
  • 8
  • 34
  • 56
20
votes
2 answers

Imageio in python : compressing gif

Is there a way to compress the gif while making it with imageio in python? I am making gif with about 200 images and the final file is 30MB. I would prefer if it is 5-10 MB. Anyway the images are mono-colour so should be fine to compress. Is there a…
jkhadka
  • 2,443
  • 8
  • 34
  • 56
12
votes
6 answers

ValueError: Could not find a format to read the specified file in mode 'i'

I am trying to read a png file into a python-flask application running in docker and am getting an error that says ValueError: Could not find a format to read the specified file in mode 'i' i have uploaded a file using an HTML file and now i am…
Calcutta
  • 1,021
  • 3
  • 16
  • 36
11
votes
1 answer

combine several GIF horizontally - python

I have two GIF files, and I want to combine them horizontally to be shown beside each other, and they play together. They have equal frames. I tried a lot online for a solution, but didn't find something which is supporting GIF. I think the imageio…
Mostafa Hussein
  • 361
  • 4
  • 16
11
votes
1 answer

Python ImageIO WARNING:root:IMAGEIO FFMPEG_WRITER WARNING

I'm working in python with some images and I'm trying to convert a series of images with size = 961x509 into an MP4 movie file. I've already did this and it's working but I have a quite annoying problem with a warning which says something like this…
cavaler12345
  • 367
  • 1
  • 5
  • 15
8
votes
2 answers

python imageio mp4 video from a set of png images

How do I make an mp4 video from a set of png images with the module imageio? I've tried this: import imageio import glob writer = imageio.get_writer('test.mp4', fps=20) for png_path in glob.glob('*.png'): im = imageio.imread(png_path), …
tommy.carstensen
  • 8,962
  • 15
  • 65
  • 108
8
votes
0 answers

ImageIO - Is video get_reader() fork safe?

I'm using ImageIO's get_reader() function on a video in a context where the process doing this is going to be forked. This reader is then continually randomly indexed (using the get_data method). Eventually, I run into an error…
Jenny Shoars
  • 994
  • 3
  • 16
  • 40
7
votes
2 answers

Converting the response of Python get request(jpg content) in Numpy Array

The workflow of my function is the following: retrieve a jpg through python get request save image as png (even though is downloaded as jpg) on disk use imageio to read from disk image and transform it into numpy array work with the array This is…
7
votes
1 answer

Quality Loss In ImageIO

I have a series of high resolution images I want to convert to an MP4 file in Python(3.6) using ImageIO. Is there any way I can do it without compression or losing quality? Currently I use the code : fileList = [] path =…
Zohair
  • 465
  • 1
  • 6
  • 8
7
votes
0 answers

python imageio image size without loading image to memory

I am using imageio with Python. It seems to have a cleaner API than PIL and consorts, so I would like to continue using imageio instead of other tools. I know how to get image size: height, width, channels = imageio.imread(filepath).shape Is there…
Zorglub29
  • 6,979
  • 6
  • 20
  • 37
7
votes
1 answer

Three different types of output when reading an image with three different libraries in Python

I am reading an image in python with three different libraries imageio PIL.Image cv2. The output I am getting on reading image with each one of these libraries is different. For example On reading with imageio a =…
7
votes
1 answer

transparent background in gif using Python Imageio

Basically I am using following piece of code to make gif out of images, my images are png with transparent background but the gif is with black background. I dont know how to make the gif with transparent background. #gif writer with…
jkhadka
  • 2,443
  • 8
  • 34
  • 56
7
votes
3 answers

ffmpeg installation on macOS for MoviePy fails with SSL error

I'm trying to write a Python program that uses MoviePy on Mac OS 10.11.16 to convert an MP4 file to GIF. I use: import moviepy.editor as mp and I get an error saying I need to call imageio.plugins.ffmpeg.download() so I can download ffmpeg. I…
shmible
  • 71
  • 1
  • 3
6
votes
2 answers

convert EXR to JPEG using ImageIO and Python

I'm simply trying to convert and EXR to a jpg image however my results are turning out to be very dark. Does anyone know what I'm doing wrong here? I'm normalizing the image values and then placing them into 0-255 color space. It still appears…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
6
votes
4 answers

Images dimensions error in python

Trying to match two images to find out the scores between them.But it shows some dimension error.Unable to fix the issue.My code is given below: from skimage.measure import compare_ssim #import argparse #import imutils import…
1
2 3
12 13