Fixing the problem with sideways iPhone photos uploaded to Drupal

So I have an iPhone now–more on that later–and one of the first things I noticed as a side-effect of switching from Android is that portrait-orientation photos I take on the iPhone and upload to this blog appear rotated 90º.

Apparently this is a well-known thing, and subject to various religious interpretations as to whether Apple has chosen to do the right thing or the wrong thing.

What’s happening is that when an iPhone takes a photo, the only time the orientation of the pixels of the photo are “correct” is when the camera is situated such that the home button is on the right and the orientation is landscape. In all other situations–like a portrait photo, for example–the pixels don’t get moved, but the orientation gets burned into the EXIF data of the resulting image.

In other words, there’s a secret message inside the photo that says “despite all appearances to the contrary, I’m actually a portrait photo.” Like this:

Screen shot showing orientation information in EXIF data

As long as you remain within the universe of applications that read this secret message and rotate the photo accordingly, all is well. But as soon as you step outside, into the cold hinterlands that ignore this EXIF data and show the photo “as is,” then you run into trouble. Like when I upload a photo to this blog, in Drupal. When I do that with a portrait photo, it appears rotated 90º.

How to solve this?

The Imagecache Actions module for Drupal 7 to the rescue, specifically its Imagecache Autorotate sub-module. By installing these, and then adding an autorotate effect as the first operation in an ImageCache style, Drupal will magically auto-rotate the image based on what it finds burned into the EXIF.

Screen shot showing ImageCache Autorotate in an Image Style 

If there’s not orientation data in the EXIF, Imagecache Autorotate does nothing, and no images are harmed in the process.

Goodbye Catholic Family Services Bureau

The CBC reported today that P.E.I. Catholic Family Services Bureau [is] shutting down after 89 years.

Catholic Family Services has been of great help to our family over the years, and I am sad that it will not be here to support future generations.

Oliver followed Executive Director Peter Mutch there when he migrated his music therapy practice under its umbrella; in later years, Oliver worked with the excellent Katherine Lowings in music therapy and, more recently, general therapy. Oliver also participated in the youth choir that Katherine and her colleagues organized.

Catherine and I benefited from Peter’s wise counsel over the years, as a family, and, as a Home & School volunteer, I appreciated Peter’s spearheading off the “Triple P” parenting program on the Island and his advocacy on myriad issues.

Catholic Family Services offered its services, for free or at very low cost, to anyone, regardless of religion (I’ve always appreciated the welcoming rainbow flag sticker on the front window).

To Peter and Katherine and all the staff, we say thank you for your service, both to our family, and to hundreds of families over the years. You will be missed.

Sledgehammer

The Rogers Hardware sledgehammer, which I bought more than 20 years ago at their going-out-of-business sale, is useful about once a year.

But when it’s useful, it’s really useful.

Like today, when I repurposed the 2x2 that the snowplowing company left at the end of our driveway to be an over-engineered tomato stake for Jackson.

That tomato is not going to droop, no matter what.

Get off my lawn!

Back in the day, when it seemed like Nickelback was playing at the Charlottetown waterfront every second weekend, I developed the reputation of being something of a curmudgeon. Truth be told my protests were always rooted in a feeling that public land should remain public, not given over to concert prompters, but the subtlety was often lost on the readership.

As such, I celebrate the sweet sounds coming out of the third floor apartment next door unreservedly: if I can’t revel in the vigorous music-making of the young, what’s the point of being alive?

Free Parking

Two months ago I proposed that the City of Charlottetown take steps to make the downtown, south of Grafton Street, an “active transportation first” zone:

As spring arrives and we all spend more time outside, those of us who live in downtown Charlottetown are awakening to a very changed urban landscape, where there are more pedestrians, wheelchairs and bicycles than there are vehicles.

We’re discovering that, suddenly, we have the wrong kind of streetscape for the times: vast swathes of pavement devoted to the absent automobiles, while we all crowd together on the sidewalks and sides of the streets.

I wasn’t proposing that streets be closed, that cars be banned, simply a lowering of the speed limit, and a change in emphasis so that cars would become second-class citizens to those walking, wheeling and cycling.

While my downtown city councillor was enthusiastic about the idea, no political will emerged to support it, and, instead, the city decided to make parking downtown free, which is the opposite of supporting active transportation, for it will serve only to encourage more vehicles in the city’s core:

The city’s finance committee decided that parking would be free in June following discussions with stakeholders such as Downtown Charlottetown Inc., the Greater Charlottetown Area Chamber of Commerce and Discover Charlottetown, as well as with the Charlottetown Area Development Corporation, which manages the parkades.

It’s all part of our assistance to help the downtown get back on its feet,’’ the mayor said.

Careful readers will note that the city consulted not with anyone who actually lives downtown, and might benefit from a furtherance of the more citizen-friendly low-traffic situation we’ve seen during the pandemic; instead the consultations were held only with business owners, not known, as a group, for their embrace of anything but having customers being able to park directly at their door (despite the benefits to business, well-demonstrated in other cities, of encouraging more wheelchair, pedestrian and cycle traffic in downtown cores).

City Council has, alas, failed in doing anything but trying to hurry along the return to some simulacrum of the way things used to be, rather than supporting citizens, most of whom are not downtown business owners, in attaining a more convivial and safe place to live.

Pages