Retina images on the web

Techie post alert! This isn’t one of my normal politics posts!

As I’ve mentioned on Twitter, I’m working on a new version of this site, which will have room for a little more content.

With the release of the new iPad, websites will be forced to improve. Traditionally, sites could be built by just using a straightforward image, with a defined number of pixels per image. The whole point of the retina display is to try and hide the existence of the pixel, to make the image as detailed as possible.

This is something of a challenge for web designers – sites built with the old methods can look a little blurry. For an example, just look at any app which hasn’t yet been updated with retina graphics.

There’s some discussion as to how to best go about this. Progressive JPEG files seem to work well, whilst Apple themselves use javascript to reduce the load on the site.

I’m not happy with using javascript. Although the new iPad supports it, eventually high resolution screens will be the norm on PCs, which may be using NoScript to block the use of javascript. I’ve gone with progressive JPEG files:

  1. For each file, I save it at double the size I will be using on the site, and save it in Photoshop as a progressive JPEG (File -> Save for web -> JPEG -> Checkbox marked ‘Progressive’)
  2. The section (or div) I’m using has a fixed width, and has background-size defined as the same width. So for an image of 1260px, the below CSS code is used:
#sections {
background-image:url('img/parliament.jpg');
background-size:630px; 
width: 630px; height: 300px;
}

The drawback of this method is filesize. This site doesn’t get a huge amount of traffic at the moment, so the server is fine. I’d be interested to know if anyone has any problems loading the new site, although I’ve moved to a new web host who should be more reliable. The other problem is the lack of transparency, which was always a wonderful feature of PNG files.

There’s always SVG files – vector images. (For the non-technical, these are images that don’t record pixels, but rather points, and then work out the lines in between them). These are great for logos (and can be zoomed to an infinite level), but are no good for photographs.

Either way, the result is much clearer, even using progressive JPEG files.

There’s a great demo of what the results are here. You need an iPad to see the true results, but it’s definitely worth it. The possibility of the wide use of high resolution displays is an interesting one.

Access and Lobbying – Two Sides of the Same Coin

Understandably, there has been much anger over the ‘cash for access’ scandal and the claims made by Peter Cruddas. The notion that someone could pay to bend the ear of politicians is alarming, but there’s an argument that this already happens.

The research by Full Fact into lobbying by way on banqueting, select committees and APPGs isn’t lobbying in the sense often used in the papers, in that very little of it was done by third parties on behalf of their clients. Nevertheless, many charities and companies provide funding for APPGs, or provide benefits such as tickets to sporting events.

When the claims made by Mr Cruddas became public, the debate immediately turned to party funding. Whilst this is a perfectly legitimate point, there was room for a much broader debate about access to politicians, which failed to materialise. Full Fact’s work on lobbying provides another chance for a debate that needs to take place. Simply ignoring the issue will only result in the same problems emerging.

Disclosure: I worked as an intern at Full Fact for two months, and during that time helped process some of the data for the lobbying research.

Lobbying: Full Fact Research

Today the Independent have published an article on the research done by Full Fact on lobbying. I was lucky enough to have a bit to do with the data side of things, going through some of the published data on banqueting and All Party Parliamentary Groups (APPGs).

I’ll be writing a little more on this in the near future. In the meantime, the individual contributions to APPGs are well worth a read. You can find the raw data here (note: this is the latest data, while due to the length of the process the data used by Full Fact was from December 2011).