My images are all upside down!
Surprises are not new to Cucumbertown. Sometimes they come in the form of spice boxes and sometimes they come in as KitchenAid artisan pro’s.
This to me is the best part of building a company. The serendipitous hit of the most unlikely scenarios adding up as experiences and owning up to them. Nothing beats this.
Last Friday evening was rather amusing.
Two new Cucumbertown users Courtney & Samantha pinged us and complained their recipes images were upside down.We probed. The images were indeed upside down.
What was more surprising was that the users said the images looked fine on their laptops.
I pinged Courtney & Samantha to send us the original images.
Arun inspected it and took a look at the exif data. Both of them came from iPhones.
A quick google search and cnet had the answer.
“Before iOS 5, the only way to snap a photo with your iPhone was to tap the onscreen shutter button–always a somewhat awkward maneuver. But with iOS 5, Apple transformed the volume-up button into a shutter release, thereby making iPhone photography feel a bit more natural.
Just one problem: when you flip your phone around so the volume-up button is facing, well, up, you end up with upside-down photos and videos.”
With a bit of inspection we saw hope. Iphone was preserving the orientation in the Exif data. This is good news. At least we can take a shot at attempting to rotate.
Cucumbertown is a Python shop and we use the PIL library to do image manipulation.
Investigating more and as usual somebody has already tried to figure out a solution on stackoverflow.
Pretty simple and the solution went out in the next 10 mins.
Except for a minor bug 🙂 We forgot that images could uploaded be without exif data. There goes the fix and to production.
Its pretty interesting how a minor change in technology can have a tremendous impact on something that relies on it.
Code Credits: Arun