2011-09-11 5 views
0

アプリエンジンイメージ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 
関連する問題