0
im=Image.open ("trial.jpg")              

a = im.resize((300,300), Image.ANTIALIAS)   
b = a.save("im.jpg")

im1 = Image.open ("im.jpg")
loadres = numpy.array(im1)

ive resized image trial to 300x300 image and saved it as im.jpg.
but once i turn it into an array and check image sizes this is what i get

>>> im.size
(450, 400)
>>> im1.size
(300, 300)
>>> loadres.size
270000

loadres seems to have the combined size of im and im1 (450x400 = 18k) + (300x300 = 9k)
loadres.size = 18k+ 9k = 27k

any ideas as to why?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by iwanttolearnc
1

jpeg quality setting is same in the files as checked in image editor like IrfranView?

But, wait a moment the size looks right for me:
3 primary colors * 300 * 300 == 270 000

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.