Cherian Thomas

Friend | Co-founder of Cucumbertown| Cook | I make beautiful things that keep me up all day & night
Subscribe via RSS Contact Me
Can you send a pic of something youve cooked to pic@cucumbertown.com
Instagram Google+
8 January 2013

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.

Thai Green Shrimp Curry Cucumbertown My images are all 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.

TexMex Sour Cream Chicken Enchiladas with Tomatillos Cucumbertown 11 My images are all upside down!

Arun inspected it and took a look at the exif data. Both of them came from iPhones.

Droplr • Screenshot on 12.16.2012 at 4.58.47 PM.png My images are all upside down!

A quick google search and cnet had the answer.

tl;dr version:
“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.”

There goes!

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 icon smile My images are all upside down! 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

  • John

    So the problem was nothing to do with the iPhone at all, you were just ignoring EXIF data? Idiot

    • http://swombat.com Daniel Tenner

      Another piece of evidence for Gabe’s Greater Internet Dickwad Theory…

  • Svein Ove Aas

    Be nice. They didn’t look at EXIF data, but that only became a problem due to browsers which didn’t look at EXIF data either. One is a bug, the other really isn’t.

    I’ll give you a hint: It’s the program that’s intended to display images that should rotate the image properly.

  • NetscapePizza

    The whole of OSX has always respected the exif rotation

  • Max C

    Actually this has nothing to do with the volume up button – in fact it’s a problem that particularly affects cookery photos. When shooting straight down, or nearly straight down, the iPhone’s usual logic for working out the orientation falls apart, because the direction of gravity is no longer relevant. Instead, it’s which side of the phone the user is standing that determines what orientation people expect the photo in, and there’s no way to determine that.

  • Boss

    I have a friend who sends me iphone photos and they appear right-side-up in thumbnail, but when clicked on (gmail) they open upside down, every time. And this was before iphone 5. He does not use volume button, and does not take ‘cookery photos’ or photos where the orientation is confusing for the phone. Seems like something more is yet going on..