It occurred with my iPhone with PNG as phonegap camera encoding type and Apple uses the Orientation meta data tag, it seems the following values give guidance on how to rotate your uploaded image before you save.
This applies only to images saved in the datastore db.Blob, NOT the blobstore ! In blobstore you have no influence during the upload and the blobstore handles the orientation correctly.
The following post supported my solution:
http://lkubaski.wordpress.com/2013/01/18/rotating-photos-from-mobile-devices-uploaded-to-google-app-engine/
This posts lists the iOS orientation values used:
1: image is Normal-> that’s the orientation value you get when the iphone home button is on the right 2: image is flipped horizontally 3: image is rotated 180° -> that’s the orientation value you get when the iphone home button is on the left 4: image is flipped vertically 5: image is rotated 90° CCW and flipped vertically 6: image is rotated 90° CW 7: image is rotated 90° CW and flipped vertically 8: image is rotated 90° CCW How to rotate the image orientation = 1 -> don’t rotate orientation = 3 -> rotate 180° clockwise orientation = 6 -> rotate 90° clockwise orientation = 8 -> rotate -90° clockwise (or 90° counter clockwise if you prefer)
The sample code (python google appengine):
obj = YourDBObj() img = images.Image(raw_file) img.resize(140) save = img.execute_transforms(output_encoding=images.PNG, parse_source_metadata=True) meta_data = img.get_original_metadata() if meta_data != None: logging.info('debug: meta data nach image %s', meta_data) if meta_data.get("Orientation"): logging.info('debug: meta data Orientation found %s', meta_data["Orientation"]) if meta_data.get("Orientation") == 6: logging.info('debug: rotate image by 90') img.rotate(90) save = img.execute_transforms(output_encoding=images.PNG, parse_source_metadata=True) else: logging.info('debug: no orientation') obj.pict = db.Blob(save) obj.put()For blogstore objects using the image get_serving_url() you could do rotation by adding -r90 as of an undocumented feature: https://code.google.com/p/googleappengine/issues/detail?id=4200
Hi friends, This is Victoria from Chennai. I am a technology freak. I have read your blog. It was really a wonderful article and I was really impressed by reading this blog. Thanks for sharing this informative blog. I did HTML Training in Chennai at FITA academy, Its really useful for me to make a bright future.
ReplyDeleteMachine Learning Projects for Final Year machine learning projects for final year
DeleteDeep Learning Projects assist final year students with improving your applied Deep Learning skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include Deep Learning projects for final year into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Deep Learning Projects for Final Year even arrange a more significant compensation.
Python Training in Chennai Project Centers in Chennai
Digital cameras photography follows a lot of the similar techniques that produce successful film photographs. Nevertheless, digital cameras are different in some important ways. gopro helmet mount
ReplyDeleteNice Blog...
ReplyDeletet system placement paper
advantages of package in java
2xwy cable full form
react native developer resume sample
log(a2/bc) + log(b2/ac(c2/ab) is
error: cannot find module '../lib/utils/unsupported.js'
django.core.exceptions.improperlyconfigured: error loading mysqldb module.
infix to postfix python
what is your biggest achievement yahoo answers
toughest pattern programs in c
Good...
ReplyDeleteece internship
internships for cse students
internships in chennai for cse students
internships in chennai for cse students 2019
internship for ece
internship in chennai for mechanical
10 days internship
mechanical internship certificate
internship for aerospace engineering students
winter internship 2019 for cse students
This comment has been removed by the author.
ReplyDeleteLink 12bet.co.uk Review - VIP Casino
ReplyDeleteTrusted Link 12bet.co.uk review of VIP casino. Get a VIP casino login bonus, free カジノ シークレット spins 12bet and other casino 메리트카지노 offers from