|
Did you write to the file and not close it or something?
|
# ¿ Jun 3, 2021 00:02 |
|
|
# ¿ Apr 27, 2024 16:20 |
|
Yeah I didn't actually read your code. Maybe print the file size or otherwise make sure it's writing a valid image though.
|
# ¿ Jun 3, 2021 00:04 |
|
Also are you really supposed to use response.raw? I think it might break in some situations.
|
# ¿ Jun 3, 2021 00:08 |
|
code:
|
# ¿ Jun 3, 2021 00:16 |
|
You don't even need to be logged in to access avatars, it seems, so you can just do something like this to test it:code:
|
# ¿ Jun 3, 2021 00:20 |
|
hbag posted:alright well im out of ideas for how to download an image from the link
|
# ¿ Jun 3, 2021 00:23 |
|
hbag posted:NOW what need to do is figure out how to detect if an entire image is just one big transparent space
|
# ¿ Jun 3, 2021 02:42 |
|
hbag posted:i thought putting loops inside loops was a bad idea Fart simpson is just trying to make everything complicated. You can probably just do something like: code:
Also this might not handle gifs if people still use gifs, because they're indexed color and I don't care enough to check whether they are treated as a different color mode by pillow.
|
# ¿ Jun 3, 2021 03:06 |
|
fart simpson posted:i already posted a link to the pillow docs for the built in method that tells you the min and max pixel values for an entire band of the whole image seems pretty simple and useful here to me
|
# ¿ Jun 3, 2021 03:23 |
|
|
# ¿ Apr 27, 2024 16:20 |
|
Who needs SVG when you can use webass to run a windows emulator and render gdi+ to a canvas?
|
# ¿ Jun 4, 2021 11:51 |