+ 1
How do I manipulate a PNG in Python?
Yeah, I would want to manipulate black-white (only black and white pixels, not gray) images, just get the color value of a pixel at a specific coordinate and set the pixel color (still black or white) for a specific coordinate to a PNG and at last also create PNG files. Is there a (simple) way to do this without external libraries or are they basically a must have?
6 ответов
+ 2
Check the PIL library, dm me if you want
+ 2
Of course it does, I use PIL
+ 1
"The current free version is PIL 1.1.7. This release supports Python 1.5.2 and newer, including 2.5 and 2.6. A version for 3.X will be released later.
-pythonware.com/products/pil/
There's apparently no version for python 3, will it work?
Aymane Boukrouh
Yeah, and thanks for answering my question, even if I got questions about the answer😁
+ 1
You could quite easily manipulate some image files with Pygame.
+ 1
I think you can convert it to a numpy array and mess with it like that. I’ve done it with DICOMs, but not with PNGs, although I assume it would be similar.
0
Jan Markus where you been?