BitBox: A travel and tech site

Image orientation and exiftran

|

When travelling, writing a blog needs to be fast. Who wants to be in your room writing and fussing with images when your dream destination is just outside the door? I find image wrangling the most time consuming part of creating a blog entry. For our trip to France, I tried to make a workflow that minimizes the effort needed to create daily blog entries. The solution was Jekyll which can process simple text files with markdown and generate static HTML files. However, one issue I had to handle when using Jekyll and Markdown for the blog was that of image orientation. What was a simple way to correct orientation that did not involve adding CSS code in the markdown? If you are on a Debian based distro, such as Ubuntu, exiftran can be helpful. The idea is to just post your blog and upload the images to your web server and then run the utility to correct the orientation. It does not get much easier.

So here is what I did. I created my blog post and pushed my images up to the server without worrying about the orientation. As you can see, some images are incorrectly displayed.

 text

Then, I installed the exif utilities.

$ sudo apt-get install exif
$ sudo apt-get install exiftran

Inspect the EXIF for the image.

$ exif ArlesVanGoghTri.JPG

EXIF tags in 'ArlesVanGoghTri.JPG' ('Intel' byte order):
--------------------+----------------------------------------------------------
Tag                 |Value
--------------------+----------------------------------------------------------
Manufacturer        |Canon
Model               |Canon EOS 70D
Orientation         |Right-top
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Date and Time       |2017:06:30 16:47:21
Artist              |
YCbCr Positioning   |Co-sited
Copyright           |[None] (Photographer) - [None] (Editor)
Compression         |JPEG compression
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Exposure Time       |1/100 sec.
F-Number            |f/5.6
Exposure Program    |Not defined
ISO Speed Ratings   |100
Exif Version        |Exif Version 2.3
Date and Time (Origi|2017:06:30 16:47:21
Date and Time (Digit|2017:06:30 23:39:12
Components Configura|Y Cb Cr -
Shutter Speed       |6.62 EV (1/98 sec.)
Aperture            |5.00 EV (f/5.7)
Exposure Bias       |0.00 EV
Metering Mode       |Pattern
Flash               |Flash did not fire, compulsory flash mode
Focal Length        |50.0 mm
Maker Note          |6730 bytes undefined data
User Comment        |
Sub-second Time     |85
Sub-second Time (Ori|85
Sub-second Time (Dig|71
FlashPixVersion     |FlashPix Version 1.0
Colour Space        |sRGB
Pixel X Dimension   |1920
Pixel Y Dimension   |1280
Focal Plane X-Resolu|6086.763
Focal Plane Y-Resolu|6090.150
Focal Plane Resoluti|Inch
Custom Rendered     |Normal process

Notice the Orientation says “Right-top” which means the right top corner of the image is currently in the top left corner. Jekyll plain Markdown does not take into account the exif orientation information , so the image is displayed incorrectly.

$ exiftran -ai ArlesVanGoghTri.JPG
processing ArlesVanGoghTri.JPG

Now notice the Orientation has changed…

$ exif ArlesVanGoghTri.JPG

EXIF tags in 'ArlesVanGoghTri.JPG' ('Intel' byte order):
--------------------+----------------------------------------------------------
Tag                 |Value
--------------------+----------------------------------------------------------
Manufacturer        |Canon
Model               |Canon EOS 70D
Orientation         |Top-left
...

And the image is now correctly rendered in the browser.

 text

Doing each image individually is a hassle. You can process all images using a glob.

$ exiftran -ai *.jpg

This will automatically rotate all the .jpg files in the current working directory based on their exif data. (Do a backup if you are paranoid about globbing all over yourself)

Handy little utility.

Finally Kitesurfing

|

Chuffed to have had the chance to kitesurf on a strapless surfboard today! When I first got interested in Kiteboarding my first major milestone was to kite my local spot, Cook Street. It is a tricky site and I needed to be well beyond beginner in skill to take it on. Happily, I reached that goal last year. My next big goal was to get onto a strapless surfboard. Sure, big air or fancy technical jumps are cool but, to me, riding a surfboard, Kitesurfing, seems like the coolest thing in the wide world of Kiteboarding. Surfing, itself, has so much cachet. Adding a kite to surfing makes it even more incredible.

It was a light wind day at Nitinat Lake. Dave C. generously lent me his Ocean Rodeo Mako Duke for the day. I was a little nervous about taking a surfboard out so I asked Roberto from Strong Kiteboarding to keep an eye out and come fetch me with the jetski if I was hopelessly down at the end of the lake. It is very reassuring to know that the instructors at the two schools will rescue you if needed. That assurance allows newish kiters like me to try new things with the confidence that someone has your back. Most appreciated! Happily, I took to the surfboard quite readily. My first session, I launched by the schools and was up on the board on my first power stroke. After three tacks I had only lost a little ground and landed at the main kite launch area. My second session was better. On shore, I got some advice on how to point the surfboard and it really helped. I was easily up by the river mouth in just a few tacks even though I had to water start at each tack. It is a lot of fun on a surfboard.

I exceeded my own expectations, being able to stay upwind and ride quite comfortably. I might just have to get a Duke.

 text

Last day in France

|

We were up early-ish but reality tasks like flight check-ins (on hold with Air France for 60 minutes) took up a lot of our morning. So we got out the door – after a late breakfast of croissant, coffee and pastries – by around 11am. We were trying to be French Riviera French, and so, to the beach! I was delighted that the French language was in the majority on the beach. We swam and lazed. It was great! Unfortunately, as pastey , Irish-extraction Canadians, the sun did not brown us as much as broil us. Who cares! We are living the life down south!

 text

After the beach, we came back to the apartment for a quick refresher, and then out for some tapas and rose wine. I was then assisted by my girls on my endeavor to find a scarf. It had become clear to me, during our time in France, that French people consider a scarf a necessary fashion accessory, so I thought that might be a nice souvenir of my trip. Yes, I have lots of scarves, but they are Canadian scarves! I wanted a warm weather accessory! Happily, we found the solution: a scarf light enough that I was able to wear in Cassis in July at the height of the day!

After a bit of a rest, we went to the parking lot to arrange and weigh our bags. We borrowed the weigh scale in the apartment and stood there in the lot weighing bags as beachgoers were leaving the parking lot at the end the day.

 text

Then out we ventured for one final meal and a walk on the breakwater before heading home, with heavy hearts, to pack for home.  text  text  text

And finally to Cassis

|

We packed up and left Arles without much sentiment. Not that Arles was unpleasant, it was a lovely town, but our new and final destination made us look more forward than back. Cassis! The Mediterranean! The Cote d’Azur! Who doesn’t want to go there?

We took the “A” toll roads to get there fast. Although I made reference to crossing the potato/tomato line in an earlier post, I think that we actually did cross that line today. In the 2 hour drive from Arles to Cassis, the landscape became distinctly more Mediterranean and the Cicadas could be heard above the noise of our van moving at 120kph down a six lane highway. They are so loud and constant during the day.

 text

Exiting the toll highway, we stopped at the toll booth and looked down into the valley while smelling the hot dry pine trees that populate the mountains. We then descended down the mountainside into the seaside valley of Cassis.

We parked Colin and just went walking around the town. We stopped for salad and rose wine at a restaurant that was at the very edge of the harbour. Some young kids even came through the restaurant on their way to some low bluffs to swim in the sea. I also saw some kids in Opti dinghies being towed out for an afternoon of sailing.

 text

Afterwards, we walked the shore front and then checked out the Plage de la Grande Mer, the closest beach to the town centre. We then went to our new flat to get settled.

At 4pm, we boarded the regal Moby Dick III for a one hour tour of the famous Cassis calanque.

 text  text  text

After the boat ride we went back to our flat for a bit of a rest, then Kristine and Athena went shopping while Triumph and I sat around. But not for long. We decided to get a few groceries but only after we had had a swim in the Mediterranean at the Plage de la Grande Mer. It was 6:30pm but there were still many people on the beach. We waded into the sea and found it to be colder than we had expected. Nonetheless, we swam for a half hour and then went grocery shopping.

Back to the flat for a drink and to drink in the view.

 text

We went in search of dinner at the harbour and then an evening walk.

 text  text

Home to bed to rest for our last full day of France :-/

A day in the countryside

|

We had an easy morning, with a bit of a lie in and light breakfast. We also planned our day trip to Pont du Gard. Kristine and Athena went to the store for picnic nosh while Triumph and I went to fetch Colin. We agreed to meet under the bridge because it sounds excitingly dodgy and is also a convenient place to park near our flat.

Once we loaded the vehicle, we headed north over the Rhone bound for Pont du Gard. A couple of wrong turns righted and we made it. It was a lovely warm day but windy and gusty. We went past many fields of fully bloomed sunflowers.

 text

Under the arches of the great roman aqueduct, we enjoyed our picnic of salad, tampenade, olives, chips, hummus, berries and, of course, baguette. We then hiked about the Pont making it up to the top on both sides. Then we went down to the river for a swim.

 text

There were many French families enjoying Sunday by the river. There were also many French teenagers, full of life, laughing and shouting and jumping off the bluffs into the river.

The Pont, itself, is spectacular and profound. To think of all the years that that engineered structure has stood there is simply incredible. With Canada Day still in my mind, I was shocked and yet delighted to see multiple instances of “graffiti” on the Pont dating back to before Canadian confederation. Etchings like, “Marcel was here. 1830”.

We loved our time at the Pont and here are some shots to prove it….

 text  text  text  text  text  text  text

 text

Of course, we made our way home after a beautiful day in the countryside. We rested, and perfumed up, and then braved the streets of Arles for food. Arles is a friendly town, and we easily got good food and company for the night.

 text  text  text

It is our last night in Arles and my beautiful family is tired and fast to bed. I sit up alone making this blog, anticipating the last few days in France. Cassis!