Previous >what are you working on, Jow Forums?
/dpt/ — Daily Programming Thread
Other urls found in this thread:
youtube.com
google.ca
libcello.org
github.com
twitter.com
I'm sorry, but you seem to have posted the wrong op picture.
?
Why are you guys so obsessed with japanese cartoons?
Just let it go already
i want to fug nenecchi
whats the most redpilled programming language?
So I have a collection of large PNG images that I have to share regularily but since they're 100-200 MB each due to high res, I wanted to downscale them to, say, a maximum width/height of 2k for sharing purposes. Can someone just double check on what I'm doing to make sure I don't end up with fucked up proportions?
image = Image.open(os.path.join(root, file))
(width, height, ) = image.size
(new_width, new_height, ) = (width, height, )
if width > 2000:
new_width = 2000
new_height = math.ceil(height * (2000 / width))
elif height > 2000:
new_width = math.ceil(width * (2000 / height))
new_height = 2000
image.resize((new_width, new_height, )).save(os.path.join(OUT_PATH, file))
no, I didn't :^)
anime website
the one you've settled on after using at least a dozen others