Archive for September, 2006

Construction in Inkscape

Monday, September 25th, 2006

Sometimes - increasingly perhaps - I find myself using Inkscape for constructing program assets.

Program assets are a different beast to standalone artworks because you start to have to recombine artistic elements in new ways programmatically.

Most of the time, when web programming, you don’t really need to generate completely original artwork on the fly, but you often need to composite some selection of pre-drawn assets. There are a variety of ways to do this, but Inkscape doesn’t seem to make any of them very easy for me.

(more…)

Picasa Web Albums

Thursday, September 21st, 2006

Well what do you know… what with all my recent work with client-side scripting and then today’s look at Mauvesoft Gallery and scanning for photos, I was just thinking about an AJAX-powered web-based Picasa clone when I stumbled across Google’s Picasa Web Albums, which I hadn’t seen before.

I’ve uploaded a few photos to it, and it’s OK I suppose, but it’s not as developed as some of the other Google webapps: it’s just a basic web gallery. It’s better than Gallery (Capital G) because Gallery is a mess these days. Gallery 2.0 is hugely bloated, and for all that bloat it isn’t very much more powerful and certainly not as easy to use as Picasa Web albums.

Still, I think Mauvesoft Gallery is a fairly good web gallery core, and it’s simple and hackable enough that I could probably rig up some AJAX over the top quite easily. It would certainly make for an easy-to-use administration interface, but I was thinking more of the on-the-fly searching, and Picasa’s wonderful ‘Timeline’ feature. I wonder whether the publishing to the world of photos is the main aim when people use web galleries, or is it that they just want access to all their photos wherever they are? (Or a third option: my brother, on holiday, uploads photos from Internet Cafes so that he can delete them from his camera to free up space.)

A fork of Mauvesoft Gallery is used to power the ImageChooser component in my e-Commerce software, and that is desperate for some attention. The UI is appalling at the moment. Perhaps I’ll download Dojo and see if that can speed up the development.

Mauvesoft Gallery

Wednesday, September 20th, 2006

One of my old online friends, Twisted, messaged me this morning to say that he was having problems with his installation of Mauvesoft Gallery. He had reinstalled in on a new Ubuntu box but it was not thumbnailing properly: first it was not generating thumbnails; then, having fixed that, he found that it was not caching them.

Anyway, I tarballed up my unstable development version, 1.5, which adds a few features and fixes a few bugs.

Changelog

  • Feature: PHP-based templates
  • Feature: Watermarking of thumbnails
  • Feature: Images now support EXIF captions and titles
  • Theme: New theme ‘corporate’
  • Theme: ’slides’ rewritten in XHTML and CSS
  • Bug: Thumbnail transparent PNGs with GD
  • Bug: .JPG extensions not considered images
  • Bug: Directory names containing ‘+’ character
  • Bug: Imagemagick engine doesn’t work with CMYK JPEGs

He installed that and after a few permissions bugs, it’s up and running.

I suppose this makes it almost ready for an RC. The first alpha is already running on a site I did a couple of months ago for a client, Photography2you.

When I actually package this for release I’m going to use shar, which I am fairly confident I can use to configure the installation after it has unpacked. All webapps suffer from this installation problem, and there doesn’t seem to be a generic solution for installing them, even though there is a very limited range of things that need to be configured to get them off the ground on a single-vhost basis. I can’t imagine that it would be hard to write a package manager for them. Mauvesoft Gallery works on Windows and even IIS too I believe (although I’ve not tested it recently), but Windows is much more lax on the permissions (although I’ve not tried Server 2003), so a normal ZIP file may suffice.

It also occurs to me that as part of this shell-based installer I could offer the user the option to scan their $HOME and symlink any directory it find containing photos (for some definition of photo… perhaps JPEG image over 1 Megapixel?) into the Albums root. Zero-configuration installs here we come. The goal is to make Mauvesoft Gallery simpler to install and use than any other gallery software.

Flash-like effects without Flash

Tuesday, September 19th, 2006

I’ve been working on this website recently which has really challenged my technical abilities.

I’ve put together a Javascript system, which I’m quite proud of, for implementing quite a lot of Flash-like effects with pure DHTML, with the aim of remaining accessible.

The complete system works like this:

  1. You describe and lay out the pages however you want them with XHTML and CSS.
  2. You describe transition timelines in an XML-based language. You can animate scalar CSS properties and colour values with cosine interpolation; you can assign attributes and CSS properties; and you can import and replace content in the document with AJAX. For accessibility, the idea must be to transition one page completely into another, although there can be some purely graphical effects in between.
  3. The Javascript loads the transitions with AJAX and sets up event handlers to run the transition.

Easy! It’s like developing web pages in CSS, except that you get to animate your CSS properties. There’s also a bit of hackery to smooth over some IE issues.

I’ll post more about this when it’s a bit more polished.

That’s not the bit that has challenged my technical abilities. The technical challenge is working with the clients’ ideas. This job is actually under subcontract so there’s a chain of clients all wanting to get their way, but it seems to me that every time I implement something technically impressive, the clients see what I have achieved and assume that any small modification is an inherently small task. This is not universally true.

I think the site currently looks pretty naff. I’ve not had artisitic control on this one, and it’s a mess. The animations are distracting, and the clients keep asking for something ridiculous, like “make this image fill the screen”. That’s not something that can be achieved in an attractive way with a fluid layout. This was actually in the brief, which was why I originally started with a fixed layout, but one of their first demands was to move from a fixed to a fluid layout, and I can’t seem to get them to understand that’s the trade off.

This is the damage Flash has done to the world of web design. Clients want pointless effects and WYSIWYG modifications, because they’ve seen it on other sites, without knowing the actual situation with respect to accessibility or maintainability.

Planet HantsLUG

Tuesday, September 19th, 2006

My namesake Alan Pope has added this blog to Planet HantsLUG. Hello HantsLUG people!

SVG Cities with Greasemonkey

Monday, September 18th, 2006

I’ve been experimenting with using Greasemonkey to rewrite the interface to a game I’ve been playing recently called Cities. I was trying this because I wanted to test how well a native SVG interface to a web application might work, and it was much easier to work with an existing web application - one that I use - than developing one as I go.

Here’s a screenshot of the standard Cities viewport (with CSS styles by Bebe):

Cities HTML View

And this the current status of my viewport implementation:

My SVG Cities View

(more…)

SVG Kubrick Source

Monday, September 18th, 2006

One of the first things I wanted to do with Oli’s blog was start making minor alterations to the default Kubrick theme (which I really like, incidentally) in my favourite vector graphics editor, Inkscape. However, after searching the web for the source, I eventually found that the original source was a Photoshop file - one that the GIMP couldn’t open.

Frankly, I don’t think this is a very good show for an application which purports to be open-source. Anyway, as a result I pulled Wordpress’s assets into Inkscape and reconstructed the graphics, as closely as I could, tracing the originals.

The result is an SVG file and a shell script to extract the assets. The assets should all be replaced together because the match isn’t quite pixel perfect, but if you do replace them you shouldn’t notice the difference.

Policy Statement

Monday, September 18th, 2006

Ok, so I’ve been lured into the world of blogging, which I have been loathe to do ever since blogging took off.

This was partly - perhaps mainly - a result of working for a while on my brother’s blog, which was set up to allow him to keep his friends updated about his progress on his trip round the world. While working on it I became enamoured of Wordpress, because it is relatively elegant to use.

However the codebase for Wordpress is a mess. I found an outstandingly stupid bug/feature the other day on my brother’s blog: no thumbnails are generated when uploading photos over 3 Megapixels in size. There’s literally a test there that just checks the dimensions, compares to an arbitrary 3 Megapixel value, and if not, you’re silently handed back the full-size image. It also defaults to simply embedding a thumbnail, without a link or anything. And there’s no option to change that. You have to hack the code. And the particular hack needed to change the default (which is a tri-state toggle option) isn’t just reordering an array or assigning a different initial value - it requires hacks to the PHP code, the HTML code and the Javascript!

Anyway, this will not be a stream of consciousness blog about life but a blog focused on software development, primarily web-based because that’s what I do for a living. We will probably discuss the problems I’ve encountered and/or solved, interesting ideas, and shameless plugs.