Timeline for Converting colours in an image using Python Imaging Library
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 23, 2018 at 9:49 | comment | added | Swift | Dont worry, I found the mishaped "Mustard_Yellow" value, like you said, it was missing the aplha value. Im so sorry, what a derp I can be at times haha! | |
Aug 23, 2018 at 9:46 | comment | added | Swift | Could you move this to a chat? Not enough rep :'( | |
Aug 23, 2018 at 9:35 | comment | added | Graipher | @Swift: Incidentally, I just fixed the code for grayscale images. | |
Aug 23, 2018 at 9:34 | comment | added | Graipher |
@Swift: I also just checked again, this still works (try calling _convert_colour on an existing PIL image to only test that part of the code). Or maybe your incolour is of the wrong shape? It should have length 4 (with the last value being the alpha value).
|
|
Aug 23, 2018 at 9:33 | comment | added | Graipher | @Swift: Without seeing the error I cannot know what the reason is... | |
Aug 23, 2018 at 9:33 | history | edited | Graipher | CC BY-SA 4.0 |
added 98 characters in body
|
Aug 23, 2018 at 9:32 | comment | added | Swift | It's just that I get an error about mis-shaped or something like that. Let me reproduce it, perhaps you can explain the error I get. I really want to convert the colour conversion to np as it seems everyone is shouting about how much faster it can process this data for me. | |
Aug 23, 2018 at 9:28 | comment | added | Graipher |
@Swift: It does work with color images for me (you can even call image.convert("RGBA") on it without anything changing). Not sure if this would work with grayscale images, though.
|
|
Aug 22, 2018 at 13:58 | comment | added | Swift | I have amended my accepted answer as you have perfectly answered my question. I didn't think about using npy for this, but considering your experience, I will certainly take your advice. Thanks for your time :) | |
Aug 22, 2018 at 13:57 | vote | accept | Swift | ||
Aug 22, 2018 at 10:32 | history | edited | Graipher | CC BY-SA 4.0 |
added 56 characters in body
|
Aug 22, 2018 at 10:26 | history | answered | Graipher | CC BY-SA 4.0 |