Found this today, tried it and it seems to work just fine. Not much good if you want to render the PNG on a patterned background (or on a variety of different background colours), but OK if you are just using PNG as generic GIF replacements. The additional technique, described in brief at the bottom of the article will work better if you want to retain the transparency, but overall it seems more work than just saving the image from Photoshop as a GIF and then using an IE specific stylesheet.
Found this interesting technique for adding preview images to your links, I had a play with it and found it to be fairly effective. Interestingly it does capture flash movies, which quite surprised me, unfortunately it doesn't capture PNGs which makes a few of my site designs look a little weird in the previews as banners, logos and other key elements disappear. I also couldn't persuade it to preview a page in a subdirectory, I always get the site root page.
It could be that this is just a limitation of not paying for it (we're basically using the service for MSN search above, I couldn't find any information about whether I was supposed to be allowed to or not), but I filled in an info request on the developer's website and haven't yet received a response so I can't be sure.
I mentioned S3 in my short post about Jeff Barr's talk in London, I also said I'd post more about it in the coming weeks. To make up for failing to do that, here's a post by someone else about S3 Using S3 as the scalable hosting solution of the future is certainly an interesting concept, even if they've not completely nailed the details yet.
I've been doing some Ruby on Rails development in the last couple of weeks. I worked out my page design before hand, tested it in different browsers, and then encoded it into
rhtml for the default application view so it would apply to all pages, and very well it seemed to work too. The problem came when I tested the finished application - I was using the pngfix.js script to fix the transparency of an image in my banner for IE, in my initial design this all worked fine, when it was running in rails it didn't seem to work.
After viewing the generated source the problem was obvious, I had converted my static link to the image_tag helper in the application layout so that it would work on the live site and also in my development environment (different root paths) and this helper adds a random key to the end of the image src to stop the browser caching it, so it now looked like
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
And replace it with:
if (imgName.indexOf('.PNG') > 0)
There's a small chance the script will now incorrectly identify images which have the string
.png embedded in their names for some reason, but I figure the chance of that is small.
Also on the front page, but I couldn't figure out a permalink. Warning, language is not work safe
Edit: The link broke, so I've uploaded my own copy.
Not that I'm likely to be posting any trade secrets myself, or that a ruling in a California court is likely to offer me much protection here in London, or that I really believe I fit the definition of 'journalist' implied by the appeal court (which, no doubt, will be subject to further cases), but it's nice to know at least one legal system can be sensible about the web.
Having recently installed a few new extensions in Firefox I thought I might share my favourite ones:
Always nice to know exactly what content your server is pumping out, but this extension is really useful if you are trying to debug Ajax applications.
Web Developer Toolbar
Absolutely the single most useful extension ever. I always use the Resize tool to check my page designs at a number of different resolutions.
A significant chunk of my working life is spent making web applications resemble the websites of potential clients. Used to be I'd have to take a screenshot and then open up Photoshop to use the eyedropper tool to find out what colour page elements are, this makes the whole thing a lot easier.
Although the outline tool built into the Web Developer toolbar is useful it is limited because it can only outline element (it can't select by id or class), this extension lets you easily find out the ID of any visible element on the page.
Handy and non-intrusive, extends the basic console in Firefox so you can filter by event type and source as well as the standard severity.
View Source Chart
View the document source in a containerised and structured fashion. Much easier to spot page structure than with the standard view source, also shows the end results of DOM manipulations.
Noticed today that I wasn't getting accelerated 3D on my desktop. This was causing a number of problems, the most significant one being it stopped Wine working. I tried to investigate by running
glxinfo but just got a stream of errors like:
API ERROR: could not register entrypoint for SelectTextureSGIS
fglrxinfo with similar results, strangely when I tried as root I got no errors for either, so I'm thinking it's some sort of permissions snafu. I tried changing the DRI mode in
xorg.conf but that didn't help so I had a quick Google for the solution. Found a few posts in an Ubuntu bug database which led me to a forum post which suggested swapping the
libGL.so for an older version. I didn't want to use the version posted on the Ubuntu forum so I investigated the files I currently have, and it turns out I have two copies: one in
/usr/lib/fglrx/lib and one in
/usr/X11R6/lib/. I decided to try linking the one in
/usr/lib/fglrx/lib to the one in
cd /usr/lib/fglrx/lib rm libGL.so.1 ln ../../libGL.so libGL.so.1
I exited KDE and logged in again (to restart the X server) and 3D acceleration is back!
I have a small partition on my work laptop on which I have installed Gentoo. Most of my work stuff requires the use of windows so it doesn't get used that often, but yesterday I decided it was high time I got everything up to date. I ran an 'emerge --sync' and then an 'emerge -uDp world' and saw that pam-login was blocking shadow. So I did an 'emerge -C pam-login' and then checked again and everything was fine so started the update process and left it to update. The problem was that, because I'd left it so long, there were 400 odd packages which needed updating, including some fairly hefty ones such as X and KDE, so by the time I was ready to go home it was only at about the 68th package. I cancelled the update and shut the laptop down so I could take it home and re-start the process the next day.
I arrived the next day and tried to set the laptop to updating again but I found it booted up and then hung at the point where I should be logging in. I thought at first I'd maybe left KDM in an untenable state, but none of the virtual consoles were available and I couldn't connect via SSH. I did a bit of research into pam-login and discovered that it contains the '/bin/login' executable, except that now, of course, that binary comes from shadow instead. Unfortunately shadow is the last package that gets installed as part of the update (at least it was on the more up to date Gentoo machine I compared it with), so stopping the process part way through meant I was missing this rather important component.
The solution is easy enough - I downloaded the latest minimal install ISO from the Gentoo website, booted up from that on the laptop and then used the chroot instructions from the Gentoo Handbook to get back into my system. A simple 'emerge -u shadow' solves the problem after that. Morals of the story are:
- When you remove a package for dependency issues, check what it does first
- Trying to upgrade over 400 packages in one go is probably not a sensible strategy, next time I'm going to break it down a bit into functional groups (though next time, I might not wait so long before updating...)
Buy my book!Hello! HTML5 and CSS3 available now
Buy my other book!Early access to HTML5 in Action available now
- Semantic Web and Microformats
- Web Design
- Web Develop
This work is licensed under a Creative Commons Attribution-Share Alike 2.5 License.