2011-09-11 2 views
0

app-engine 이미지 API를 사용하여 이미지의 너비와 높이를 알아내는 방법 누군가가 나에게 사용하도록 권유했습니다 the composite function - pass your image in as the sole input image, and specify the canvas size as the desired size of the output image.app-engine image API wit python을 사용하여 이미지의 폭과 높이를 알아내는 방법은 무엇입니까?

그러나 나는 그것을 이해하지 못했습니다 !! 간단한 예가 매우 도움이 될 것입니다. 및 미리 감사드립니다!

답변

4

질문을 이해하는 경우 참조의 폭과 높이 속성을 google.appengine.api.images.Image에서 사용해야합니다.

예 :

flux = img.read() # From your request 

image_ref = Image(image_data=flux) 
w = image_ref.width 
h = image_ref.height 
관련 문제