A Python script that generates an image file in .PNG format with a resolution specified by the user as a command line argument. The image consists of random colored pixels.
Python 3.6 or later
Pillow library (can be installed with pip install pillow)
python generate_image.py width height
width: The desired width of the image in pixels.
height: The desired height of the image in pixels.
To generate an image with a resolution of 512x512 pixels:
python generate_image.py 512 512
This will create an image file named random_image.png with 512x512 pixels, each with a randomly generated color.