Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/james-p-d/mspainter
Picture generator using MS Paint in Python
https://github.com/james-p-d/mspainter
images paint python
Last synced: 2 days ago
JSON representation
Picture generator using MS Paint in Python
- Host: GitHub
- URL: https://github.com/james-p-d/mspainter
- Owner: James-P-D
- Created: 2021-05-30T19:27:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-04T20:51:21.000Z (over 3 years ago)
- Last Synced: 2024-11-17T10:36:22.573Z (2 months ago)
- Topics: images, paint, python
- Language: Python
- Homepage:
- Size: 1.86 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MSPainter
Picture generator using MS Paint in Python![Screenshot](https://github.com/James-P-D/MSPainter/blob/main/screenshot.gif)
(Note image has been sped-up. Actual process above generating a version of [David Hockney's 1966 painting The Splash](https://en.wikipedia.org/wiki/The_Splash) took 15 minutes)
## Usage
To use the program, first open MS Paint. Then run the `MSPainter.py` script, passing the full path to the image you wish to recreate:
```
python MSPainter.py c:\splash_small.jpg
```The console will prompt you to first click on the top-left color icon (black) in MS Paint, then the bottom-right colour icon (light purple), and then finally click on the top-left corner of the empty canvas.
![ClickPoints](https://github.com/James-P-D/MSPainter/blob/main/ClickPoints.png)
The program will then automatically move the mouse across the MS Paint palette and read the twenty possible colours. It will then slowly analyse the inputted image file and generate a 2D array mapping the colours of the original image to the closest possible colours available in the MS Paint palette. Once this process is complete, it will begin to paint the picture.