I’ve had a quiet blogging spell lately due to the general upheaval of changing jobs, countries and continents.
I’ve said goodbye to the consulting world and taken a position working with the gang at dpreview.com as a full-time public-facing web-developer. It’s a huge, popular and well-established site (at 9 years old it can be considered the gray lady of digital photography) recently acquired by amazon. I now find myself working in central London (frequently cursing the tube) with a young and enthusiastic team covering an equally dynamic industry.
Note: I’m retiring my rule regarding blogging about my day-job, mainly because my role has changed (more public development) and I’m keen to get more involved in the development community.
With so much going on in digital photography and the web-savvy nature of our readership, there’s plenty of exciting stuff we can (and will) do. Some of the smaller stuff I’ve been working on has already started to appear on the site, more details to follow.
A project that I’ve been working on forever has, among other features, a ‘search images by colour‘ feature. This is one that I’d been excited about for a long time and had tackled on several occasions but it had never quite come together. Until now.
My previous attempts had all involved reducing each image to a weighted list of ‘popular’ colours. The search UI let the user pick from the web (216) palette, with only images possessing a healthy portion of that colour being returned in the results. At one time I even allowed users to select a secondary colour along with RGB/HSV/CMYK (synchronised) sliders, but that was as complicated to use as it sounds, so I let it go. The problem was that this ‘popular colours’ approach ignored the fundamental truth that people just don’t search for drab browns, faded yellowy-greens or most of the other colours which make up these palettes. From a colour-space perspective, when people say ‘colour’, they mean ‘hue‘.
So earlier this week (on the train) I set about re-writing the whole colour search feature to actually be a hue-based search feature (the word colour remains because ‘hue search’ just doesn’t light up anyone’s eyes, not even mine). After a few train trips and most of Saturday I had the hue-parsing algorithm implemented and had written a console app which re-indexed all the existing images in the library. I also updated the relevant portions of the batch uploading tool and the admin web site to be hue-aware. Things were going well, but I had only a vague idea of how the actual search UI would work.
Initially I thought another slider would be the best approach, but decided it was overkill after looking around at existing html slider implementations (yahoo UI library as a nice slider, but I didn’t want the added dependency for what is essentially a minor feature). Eventually I set about rolling my own control for the job. I think the hue picker widget and the hue search feature as a whole turned out really well, and will continue to improve as the number of images in the library grows.
Now I’m thinking of packaging up the Hue Picker for free distribution. You know, just for kicks.