Phloto for My Photo Flow

evakhoury1 pts0 comments

phloto for my photo flow | cceckman.com

I’ve been taking photos lately. You can see them here.

I wasn&rsquo;t satisfied with my flow for tagging, encoding, and deploying these to my site; so I wrote a houseplant program<br>to help. If you&rsquo;re interested, you can see the code here–but, fair warning, it&rsquo;s only meant to be useful to me.

A gallery in phloto, light mode

A gallery in phloto, light mode

On this page:

Digital photo development

When I&rsquo;m developing a photo, I run through these steps:

I take a picture.

The camera captures a RAW file with the image sensor data.<br>The camera embeds metadata: the camera model, lens model, timestamp, F-stop and shutter speed, etc.

This file has more data than we typically shunt around the web.<br>My camera has 14 bits of resolution (sensitivity) in each color channel;<br>most displays still only have 8 bits / channel of color resolution.

I develop the RAW file.

Using Darktable, RAWPower, or some other software,1<br>I process the photos. After triaging,2 I make choices like cropping, exposure, white balance…

For the photos that I&rsquo;m happy with, I export a then export a developed image : a lossless 16-bit PNG.<br>These are very large files–in some cases, >100MB.

I convert the photo for the web.

The lossless, high-bit-depth image is good for archives; but for the web, I need something smaller,<br>and without a &ldquo;lossless&rdquo; requirement. I transcode the image into a web-safe image in the WebP format.3

I also create scaled-down versions. The &ldquo;featured image&rdquo; I have in the articles list<br>winds up being a lot smaller on your screen than the original; why bother sending the extra bits around?

The web versions also need to have filtered metadata. I&rsquo;d like to be able to GPS-tag my photos<br>for my own usage; but I don&rsquo;t want to put the coordinates of my backyard on my web site.

I write captions and alt-text for each image.

These go into the album page; but I try to embed these as additional metadata fields in the image.

Motivating issues

Before writing phloto, my process was to do (1) with the camera,<br>(2) with RAWPower,4 (3) with Hugo&rsquo;s image filters,<br>and (4) in the text of the Hugo page.

This process fell down in a couple places.

Portability

When I started doing more photography, I used Darktable for steps (2) and (4).<br>It&rsquo;s a really neat piece of software! It took me a while to understand Darktable&rsquo;s flow; and even then I&rsquo;m using a fraction if its power.

Even as I grew more comfortable using Darktable, I still found &ldquo;open up the computer&rdquo; to be a psychological barrier to doing image triage and editing.<br>Using a computer for this task made &ldquo;deal with photos&rdquo; that much more like a job or a chore.

I wound up getting a refubished iPad, with the explicit goal of using it for photo processing on the go. It lives in my camera bag rather than at my desk.<br>Unfortunately, an iPad can&rsquo;t run Darktable.

Metadata loss

RAWPower and Nitro, in step (2), did not carry all metadata from the RAW file into the developed PNG.<br>Only Darktable (of the software I&rsquo;ve tried) allows editing the title and description metadata fields.

The most frustrating bit: Hugo sometimes silently fails to extract Exif metadata from PNG and WebP images.<br>I can&rsquo;t &ldquo;just&rdquo; pull the caption (title) and alt text (description) out of the image, even if I&rsquo;ve set it.<br>(I&rsquo;ll file a bug to Hugo for this.)

Transcoding

I was using Hugo itself for step (3), which required putting the developed files into my Git repository.<br>Remember, these are not yet compressed; one gallery can run to over a gigabyte of data!

Modern image compression techniques are very good at shrinking file size, but they are very CPU-intensive;5<br>they take time. With two galleries, the rebuild took about four minutes.<br>Even worse, I didn&rsquo;t have Hugo caching set up properly,6 so just about every build was taking this long.

phloto

I set out with these requirements:

Web-based. The server should be accessible from my iPad, where I do the development (step 2),<br>and from my computer where I make the final site change.

Edit Exif title and description. I want to treat captions and alt-text as an &ldquo;image&rdquo; step, not as a &ldquo;web&rdquo; step.

Transcode with filtered Exif metadata.<br>I want to have my &ldquo;public-safe&rdquo; Exif tags set up-front, and have code that I&rsquo;m in charge of do the filtering.<br>I want to do the transcode approximately once, rather than spending redudnant CPU cycles.

phloto does the above.<br>It&rsquo;s a hodgepodge of untested glue between the hyper HTTP server, image and zenwebp codecs,<br>and my fork of the kamadak-exif library.

It&rsquo;s houseplant software, with no effort to be suitable for anyone other than me.<br>So, y&rsquo;know, don&rsquo;t use it.<br>But it does do some neat tricks; read on for some inspiration!

This image brought to you by phloto.

Nondestructive editing of...

rsquo image phloto metadata ldquo rdquo

Related Articles