Adham
Adham

Reputation: 64904

How to know the width and the height of image using app-engine image API wit python?

How to know the width and the height of image using app-engine image API wit python, someone adviesed me to use 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.

but i didn't understand that!! any simple example will be very helpful .. and thanks in advance !

Upvotes: 0

Views: 741

Answers (1)

sahid
sahid

Reputation: 2610

If i understand your question, you just need to use the attributes width and height from a reference of google.appengine.api.images.Image.

An example:

flux = img.read() # From your request

image_ref = Image(image_data=flux)
w = image_ref.width
h = image_ref.height

Upvotes: 4

Related Questions