Get in touch:
01524 851 877
07718 896 553

Ubuntu On Lenovo Thinkpad X201 (Blank Screen Problem)

Posted on Apr 26 2010

Just got myself one of these and had a few problems getting Ubuntu to even boot from a USB stick on it. Although it sounded like everything was going smoothly the screen was blank for some reason.

A quick google about brought up this bug:

Launchpad Bug Report

The solution to the problem is in comment #8 on there. Basically you need to use the following boot option to get the display working correctly

xforcevesa i915.modeset=0
Just stick this in at the bootloader and it should be fine. When Ubuntu is fully installed just put the same line into /etc/default/grub to make the change permanent.

Resizing An Image With PHP

Posted on Apr 08 2010

I came across this PHP class today that is great for resizing images. It is extremely easy to use and quite a small class. The class file can be downloaded here:

SimpleImage.php

A quick example usage to show how simple it is…

include('SimpleImage.php');
$image = new SimpleImage();
$image->load('picture.jpg');
$image->resize(250,400);
$image->save('picture2.jpg');

The last time I had to do some image resizing with PHP was a number of years ago and I seem to remember it being a lot more complicated than this.

Thanks to White Hat Web Design for making this little class and making it available.