Convert HEIC photos to JPEG

A quick note-to-self about how I managed to download a bunch of photos from an iPhone and convert them to JPEG on my laptop running Ubuntu 22.04.

As opposed to Android phones, iPhones do not show up as a regular disk with easy access to the DCIM folder storing photos. Fortunately, Rapid Photo Downloader managed to launch the iPhone and find all the images. Unfortunately, all the files were stored as HEIC files, using the High Efficiency Image File Format. This format is technically good but practically tricky to work with. So I wanted to convert the files to JPEG.

With some searching, I got some help with How to Open or Convert iOS HEIC Photos to JPEG and PNG in Ubuntu 20.04 | 22.04. The trick is to install a small collection of tools for working with HEIF files:

sudo apt-get install libheif-examples

Then I ran this one-liner to convert a folder of HEIC files:

for file in *.heic; do heif-convert $file ${file/%.heic/.jpg}; done

That’s it!

Programmatically resizing a folder of images

This is a note to self about how to programmatically resize and crop many images using ImageMagick.

It all started with a folder full of photos with different pixel sizes and ratios. That is because they had been captured with various cameras and had also been manually cropped. This could be verified by running this command to print their pixel sizes:

identify -format "%wx%h\n" *.JPG

Fortunately, all the images had a reasonably large pixel count, so I decided to go for a 5MP pixel count (2560×1920 in 4:3 ratio). That was achieved with this one-liner:

for i in *.JPG; do convert "$i" -resize 3000x1920 -crop 2560x1920+0+0 "$i"; done

The little script looks for all the image files in the folder and starts by resizing them to the preferred height (1920 pixels) and then cropping them to the correct width (2560 pixels). The result is a folder full of equally sized images.

Ps: the script above overwrites the original files in the folder.

Flickr introduces “long photos”

Flickr has opened for uploading videos, or, rather, what they call “long photos”. As such, they are not trying to compete with YouTube or Vimeo, but rather making it possible to upload videos that are closer to a photography than a movie (i.e. with a narrative). I like this approach, and it resonates with how I am often recording a video as if it was a photography.

The difference between what I could call a photo video and a movie video, can be seen as analog to the difference between music compostion/production and soundscaping. Composition/production is about organizing sonic events in time. Soundscaping and field recording is about capturing and reproducing sound.

Obviously, drawing distinct borders between photo videos and movie videos make no sense. After all, a video recording is using time as an element, no matter what is being recorded. And the photography/film history is full of experimentation on the borders between photography and movies. But there are some important conceptual differences and practical considerations being taken when photographing a still picture rather than shooting a movie. It will be interesting to see how people approach this, as the possibility to add “long photos” to Flickr is now a reality.



Working with time and space in images: Chessboard Studies

I have been taking photographs for many years, and I wanted to see how I could develop this a little further. On a round-trip from Japan to Tanzania, as a participant in the 16th Ship for World Youth Programme organised by the Japanese government, I decided to work with my camera in the same way as I would think about improvising with a musical instrument. This was also inspired by David Crawford’s Stop Motion Studies where he is capturing the moment by projecting a series of still photos, shot right after each other, in a random sequence. The result is the combined qualities of a still image and some temporal information of the moment.

My approach was not to remove the images from the time, but rather to put time into a series of images. Not like a traditional video approach where everything is captured, but by forcing myself to adhere to a certain time interval. Technically, I used the option of my Nikon Coolpix 8800 camera allowing for taking 16 photos (aligned in a 4×4 matrix) at a fixed time interval. The challenge was to work with this feature, and the constraints given by it, and improvise an image much in the same way as I would do when improvising a short piece of music.

In the beginning, I focused on using this function to capture time by just keeping the camera in the same position. The camera was held steady while the waves of the ocean were passing by. Although the result is quite blurry and chaotic, the effect is a sense of movement in the image.

A chessboard-study of waves with a fixed camera and external movement by the sea.

Moving on from this, I focused on a fixed object (piano) while imposing movement in the image. The idea was to resemble the feeling of playing the instrument, where a larger movement corresponds to larger gestures in the imagined “music”. Since the keys look the same all over the piano, the result does not give justice to the attempt of exposing the whole range of the piano.

Fixed subject and slight camera movement in chessboard-study of a piano.

Then I started exploring what could be called continuous image sequences, such as in the figure below depicting the deck on the ship Nippon Maru at sea. The actual movement was not continuous, though, since the camera was moved and stopped for every frame shot. However, this discontinuous recording technique gives the feeling of a “continuous” movement in the image. The image also extends the feeling and understanding of the space, since you can see 180 degrees of the view. Still, the image is quite “classic” in the way that it is a portrait of a person looking at the sea.

Discontinuous camera movement but continuous image result in chessboard-study of the deck on Nippon Maru at sea.

I then started to experiment with the idea of nonlinearity in both time and space. Below is a sequence from Yokohama harbour, which shows an example of this technique. Before shooting the sequence, I made a mental “route” of how I was going to move the camera, to move from the top of the tower in the first frame (upper left corner) to the sea level in the last frame (lower right corner), passing by several objects in between. Due to the intense light, the shutter of the camera was working very quickly, which also gave me very little time to move the camera during the shooting. The result is a rather chaotic mix, perhaps somewhat similar to how we perceive the world when we look around.

Discontinuous movement in chessboard-study of Yokohama harbour.

Testing the same technique in a “portrait” of a person, in the image below I set a high aperture value on the camera to force a shorter shutter speed even though the lighting conditions were good. Having a continuous camera movement between the frames would then result in a somewhat blurred image sequence of a person from different angles.

Discontinuous camera movement in chessboard-studies of a person.

Yet another approach I tested, was to try and depict a person by a collage technique, such as shown below. This was done by keeping the camera steady for four frames and then move to another section of the body. This example was one of the first series shot, and due to too slow camera movement I did not manage to capture the new position before in the second column. Even though I later made shots that were “correct”, I still find this sequence more interesting, with the absurdity in the shift of the body in the left column.

Continuous camera movement in chessboard-study of a person.

The whole idea of doing these experiments was to try and work with time in an image, by forcing myself to work with a time constraint (the shutter speed of the camera). I shot around 1000 such sequences during two months, and over time I developed an extensive repertoire of different techniques. Not only did I get to a point where I felt like improvising music in the images, but these experiments also changed the way I am thinking about pictures.