Category Archives: Photography

Project 365

I keep a project 365 page, which means one photo per day. It’s a good way to keep track of the passage of time and as I take my camera everywhere with me it’ quite easy. After using a blog for the photos I soon became frustrated at how long it took, so I decided to make my own wrapper for the images.

Links

Live page
GitHub repository

Overview

The images are stored on disk, with automator scripts to resize them to the appropriate sizes. They are then arranged hierarchically according to date so that they can be arranged easily on the page. A list of comments, also arranged by date, is read via PHP and served up to the client as a Javascript file. There are event listeners added to each thumbnail so that the user can browse the images.

Challenges

Challenge: Given the large number of images there are a huge amount of HTTP requests.
Solution: Each thumbnail image comes with an overhead that could be reduced in the following way. The thumbnails can be combined into a single image which is indexed according to the date of each thumbnail. This can then be sliced up by client using a canvas and arranged on the page. Doing this would save a lot of time and bandwidth for both the client and server, but would require rewriting much of the code, and it is a low priority. (To be revisited.)

Screenshots

Screenshot of Project 365.
Screenshot of Project 365.
Screenshot of Project 365.
Screenshot of Project 365.

Image transformer

When I discovered I could manipulate images with PHP one of the first things I wanted to do was perform coordinate transformations. They have fascinated me since I first came across them and so I developed this project to satifsy my curiosity about what a skyline might look like when transformed into polar coordinates.

Links

Live page
GitHub repository

Overview

This project takes an image and uses PHP to manipulate it pixel by pixel so that the \((x,y)\) coordinates get translated into \((r,\theta\) coordinates.

Challenges

Challenge: The transformation itself isn’t trivial.
Solution: The first difficulty to overcome is the transformation itself. The details are given on the page, so I won’t reproduce them here. (Resolved)
Challenge: The transformation has to be performed “backwards”.
Solution: It took me a while to realise that the transformation has to be performed from target to source rather than the other way around. Rather than taking a pixel from source to the target, the pixel must be taken from the target to the source, because otherwise the target image will have “gaps” in it. (Resolved)

Sample input and output

An image before the transformation
An image before the transformation
An image after the transformation
An image after the transformation

Photo calendar

One of my friends suggested I make a calendar featuring some of the photos I had taken while in Geneva. Here is the result. She wanted me to make some money from it, but I didn’t the quality of the images was good enough, so instead I just made it available for free. Future years might see a paid option.

Links

Live page
GitHub repository

Overview

These are twelve photos of Geneva, arranged into a calendar using Powerpoint. I might make an application that generates a calendar automatically, importing special days if I get the time. Large (90 MB) copy available upon request.

Challenges

Challenge: However this is made, it needs at least twelve pages.
Solution: I was under time pressure to make this before January 1st 2014, so I used Powerpoint for the sake of speed. (Resolved)
Photo calendar, Geneva 2014
Photo calendar, Geneva 2014