|

Finally Fixed

Posted on Thursday, 13 September 2007 at 21:46.

I’ve finally fixed my website. You can now navigate into the deeper parts again. Everything deeper than 2 levels would be broken, but it’s fixed now.

I’ve also put all the galleries back up, and instead of letting the PHP’s GD library generate the thumbnails, I generate the thumbnails locally using ImageMagick and a small PHP script, which creates way prettier thumbnails.

At first my thumbnails were rather big (for example, 44k for 120×80 pixels), but then I found out I should use -thumbnail instead of -resize, since that discards the image profile which we don’t need for thumbnails anyway. The file sizes then dropped to 4-12k, which is perfect. The same page mentions I can use -size 120x120 before loading the picture into memory, which significantly speeds up the conversion process. There are also some interesting examples for adding borders using IM.

Perhaps I should also pre-process the large pictures, because iPhoto tends to generate pretty big files. And now I can also process my wallpapers so they fit on my screen, because this is also something Mac OS X can’t handle properly. I’m glad IM’s default interpretation of -resize 120x120 is exactly what I want (in this particular case, and almost always when I want to resize a picture): “By default, the width and height are maximum values.” Brilliant!

Overall, I’m very happy everything is working again. Please let me know if I’ve missed anything.

Comments

By Christiaan on Friday, 14 September 2007 at 00:03:

Your site seems to be fixed now, but the view counter plugin you’re using seems to be a bit buggy/creative :P
Everytime I reloaded the page it went up by 4 views exactly which seemed a bit weird. Then when it got to a higher count it started going up by only 3 per refresh and other posts with even more views go up by 2 per refresh…

By Martijn on Friday, 14 September 2007 at 05:45:

Oh, that’s kinda bad. :-P

I think the counter uses cookies to see if you’ve visited before. Are your cookies turned off?

By Martien on Friday, 14 September 2007 at 08:17:

Another IM fan. Great! Way to go Martijn.

By Christiaan on Friday, 14 September 2007 at 10:41:

Both with cookies turned off or on it shows the same behavior. Also in both Firefox and Konqueror it does this so it doesn’t seem browser related. I guess it’s an interesting way to make your posts look popular ;)

Leave a comment!

Martijn loves to receive comments! Add yours by filling out the fields below.