Last active
July 25, 2025 19:01
-
-
Save pixelcmtd/ffde4dc63738fc139cf7f7a4a197ae02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| # this is just a small script to brighten an image by 30%, | |
| # which should probably be done in plain gimp, but idc | |
| from PIL import Image | |
| from sys import argv, exit | |
| if len(argv) < 3: | |
| print('usage: {} [input] [output]'.format(argv[0])) | |
| exit(1) | |
| input = Image.open(argv[1]).convert(mode='L') | |
| whitebytes = b'' | |
| for i in range(0, input.size[0] * input.size[1]): | |
| whitebytes += b'\xff' | |
| white = Image.frombytes(mode='L', size=input.size, data=whitebytes) | |
| Image.blend(input, white, 0.3).save(argv[2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment