Resize RGB image?
Alasdair McAndrew
amca01 at gmail.com
Sat Nov 24 07:22:44 EST 2012
Thank you for your speedy response! And yes, I was too hasty in firing off a request without the necessary details.
And in fact the resize from the PIL Image module does work:
f = Image.open('bird-of-paradise-flower-1.jpg')
r,c = f.size
f2 = f.resize((r//2,c//2))
f2.show()
shape(f) # returns(768, 1024, 3)
shape(f2) # returns (384, 512, 3)
I think I was confused about all the different "resize" methods floating about. Clearly I had been using the wrong one! But if f is defined - as I've just done - as an Image image, then it will use the correct resize method.
I'll crawl back under my rock now.
-Alasdair
More information about the Python-list
mailing list