Ians Ramblings Ian's ramblings, daily, ish

17Nov/050

Freezing in England

All is going great at the moment, interesting projects at work in relation to image processing and IPTC checking and what not. The weather has started to get nasty here now, was -1 when walking in to work this morning, so I am probably going to have to take my bike to be stored in a garage so it doesn't freeze.

My Dad is using this server now for testing his website. which can be found at : Dad's site. Also thanks to Chika for showing it off from her blog too x x

Also been getting quite a few hacking attempts on the server lately mainly from brazil but also the US which is a rather tedious thing to get in your mail each morning hehe.

Also in other news my little sis, Emma is now working for Cancer Research UK ! Pretty cool isnt it? So she will be giving a big speech soon all about the charity.

Filed under: Uncategorized No Comments
11Nov/050

Geek post PIL

Nothing too exciting has happened this week, so thought I would post something geeky. I was trying for hours to get the Python Imaging Library working, and thought I would describe how to do it and what to do if the standard install process does not work for your distro. This may be useful to Zope users who are having trouble with the PIL.

Firstly for lucky Debian users, they can just run the following as root: -

apt-get install python2.3-imaging

I haven't tried that myself so can't comment on how well it works.

If your not a Debian user, the first thing you need to do, is make sure that you have the relevant prerequisites installed on your machine. For me this meant the libjpeg package.

On a Red Hat or CentOS distro you can install libjpeg with the following command as root:

up2date libjpeg*

That should get you both the libjpeg and libjpeg-devel packages and install them for you.

The next thing to do is to download the python imaging library as a tarball and extract it to the location you wish to install from done by: -

Python Imaging Library

$ gunzip Imaging-1.1.5.tar.gz
$ tar xvf Imaging-1.1.5.tar

At this point I would then edit the setup.py file which is in the root of the Imaging-1.1.5 folder and add the following root path for libjpeg: -

JPEG_ROOT = './libjpeg'

Once you have done that, you need to run the build process with the following command: -

python setup.py build_ext -i

That should build all the required files. You can check it afterwards by running the following: -

python selftest.py

It should display "55 tests passed." if everything worked ok.

if you get a horrible stack trace like the following: -

Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 1225, in rotate
self.load()
File "/usr/lib/python2.3/site-packages/PIL/ImageFile.py", line 180, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 328, in _getdecoder raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available

Then that means you have a problem with your libjpeg installation.

Once you have comleted the build, you can install with the following command: -

python setup.py install

Once complete you should then be able to use the python imaging library.

If you have trouble either during the installation or when you come to actually use the library, I found that changing settings in the setup.py file, then running python setup.py clean, then deleting the PIL/_imaging.so file, then re-building and re-installing was the way to go.

Hope this helps someone

Filed under: Uncategorized No Comments
6Nov/050

Land of the shaved dome

Lee Evans was brilliant, highly recommended to the not easily offended. Also got a new phone a V3 Razor which has been fine so far, though texting is pretty different to Nokias.

Then on Saturday night ended up in Ilkeston, there were more shaved heads there than you can shake a stick at, and it would be best not to do that. Not only that but as Jon pointed out they are polished too, should have brought sun glasses :D

Good place though, didnt have any trouble, possibly due to spending quite alot of the time at a one year olds birthday party.

Filed under: Uncategorized No Comments
2Nov/050

Finally fixed

Check, check and re-check the bloomin kill switch. I think thats enough said about the bike, and the amount of time me and dave spent taking the bits out of it to test.

Certainly feels good to have the freedom to visit people back though.

In other news going to see Lee Evans this friday, that crazy guy who has monkey like mannerisms hehe.

lee evans

Filed under: Uncategorized No Comments
   
3 visitors online now
3 guests, 0 members
Max visitors today: 3 at 12:52 am UTC
This month: 3 at 08-01-2010 12:52 am UTC
This year: 48 at 06-10-2010 05:19 am UTC
All time: 48 at 06-10-2010 05:19 am UTC