I'm currently using this method

        try:
            data = blobstore.fetch_data(blob_key, 0, 50000)
            img=images.Image(image_data=data)
            size.width=img.width; size.height=img.height
        except:
            logging.info("Image Error routine of getImageSize")
            img=images.Image(blob_key=blob_key)
            img.im_feeling_lucky()
            img.execute_transforms(output_encoding=images.JPEG,
parse_source_metadata=True)
            size.width=img.width; size.height=img.height
            try: size.metadata=img.get_original_metadata()
            except: pass
I've noticed the first routine failed for some images, that's why I've 
implemented the second routine, I was hoping it was the last frontier, it 
wasn't

Recently I've noticed another faulty image in my service, the dimensions 
seem to be reversed (width <-> height), I haven't inspected the image in 
detail yet

What's the best way to determine dimensions of an image? It feels like I'm 
missing an obvious solution here

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to