аватар question@mail.ru · 01.01.1970 03:00

How to generate an image in Python?

I can load the image and display it as follows:

   import  cv2img = cv2.imread ( "" 1.jpg "" ) cv2.imshow ( "" Original "" , img)     

for example, I can load any, draw a white rectangle and lifting it on top of it and lifting it. On the screen.

However, what if I want to get a white image without preliminary download? How to replace the operation of loading the generation of an object of the image?

аватар answer@mail.ru · 01.01.1970 03:00

to use Computer Vision Library to generate images - this is ... strange. Use better

   from  pil  import  imagenimg Image.new ( 'rgb' , ( 250 ,  250 ), ( 255 ,  255 ,  255 )) img.show ()                                       

Latest

Similar