posted April 11th, 2008
Naked light used to ignore an images orientation metadata. Most modern cameras have some sort of accelerometer or gyroscope in order to determine the orientation of the camera when you take a shot. This way, when you tilt the camera sideways to take, say, a portrait, your image editing software would recognize this and properly orient the image.
Like yesterday’s bug, this is something that I had to previously ignore, due to time constraints.
There’s two parts to this bug.
First, I had to pull the orientation out of the file. This should be really easy, but wasn’t. Here’s an excerpt from the TIFF specification:
1 = The 0th row represents the visual top of the image, and the 0th column represents the visual left-hand side.
2 = The 0th row represents the visual top of the image, and the 0th column represents the visual right-hand side.
3 = The 0th row represents the visual bottom of the image, and the 0th column repre- sents the visual right-hand side.
4 = The 0th row represents the visual bottom of the image, and the 0th column repre- sents the visual left-hand side.
Not exactly user-friendly. Clearly, it was too hard for them to write, “Flip, then rotate 270˚ clockwise.” I drew up a little chart to double check everything, and I’m still a little nervous that I screwed it up.
Thankfully, Exif uses the same format for the orientation tag that TIFF does.
Second, I had to actually make the rotation work—in terms of getting the new aspect ratio right, rotating around the center of the image and not the origin, and so forth. As you can see, this was some pretty simple maths, but after Wednesday, that’s still not something I was quite looking forward to.

But now Naked light handles orientations correctly, and the world is a better place.
April 12th, 2008 at 4:05 AM
hello. i am following the development of your program with awe. the GUI looks great, as far as i can tell. is ist avalable for non-intel/ppc macs yet? if yes, i’ll buy it instantly. keep up the good work -
jay