Skip to content
Advertisement

Tag: image

How do I randomly select multiple images from folders and then layer them as a single image in Python?

I’m trying to use python to create a composite .png of randomly selected and layered png’s all with transparent backgrounds, so all layers are visible in the finished piece. For example using different coloured circles of decreasing size: a folder of the largest circles called ‘layer1’ contains 3 different coloured circles of the same size and position on transparent backgrounds,

How to save a full size image with RGB and float32?

I have an image array with RGB, np.float32, and values in the range of 0 … 1. When I multiply the array with 255, and use cv2.imwrite, the output is not correct. When I use plt.imshow(img.astype(np.float32)), the output is right, but the image size is too small. How can I output a good image? Answer The common JPEG format doesn’t

How can I automatically change my desktop background every day?

I am interested in having my desktop background automatically change every day. Perhaps taking the “picture of the day” from some website. Is this something I could do with a Python script? I can code pretty well but I only really do numerical work, so I’m just looking for an overview of the process and then I can figure out

Add color filter to Tk.Label

I have a tk.Label object with an image (via tk.Label(self.root,image=’image.png’)) and want to add a color filter to it, i.e. make the image more red. How can I do that? Answer You can modify the image with PIL, and save it as a new file. In Tkinter, you can use PhotoImage(file=”file.png”) to use the image as a button:

is it possible to write image to csv file?

Hi everyone this is my first post here and wanted to know how can ı write image files that ı scraped from a website to a csv file or if its not possible to write on csv how can ı write this header,description,time info and image to a maybe word file Here is the code Everything works perfectly just wanna

Does Image.open() distort grayscale PNG images?

Recently, I’ve been trying to load some grayscale images into my Python program using Pillow’s Image.open(). However, I’ve been finding that the image gets distorted, and all the values polarized. This is the image generated by the Mac preview: And, this is the image generated by the Image.open() function: My code is as follows: And, the characteristics of the image

Drawing a simple image, displaying it, and closing it

I am trying to do some simple drawings. I wanted to use opencv (cv2) because on a second project I have to display a small animation (rectangle, size depending on a variable; updated every X seconds). However, I do not have experience with image processing libraries and opencv. I am running into a lot of problems, one of which is

Advertisement