Archive for October, 2004

Image resizing with PHP and GD

Sunday, October 31st, 2004

GD graphics libraryThis morning I posted about some of my issues with Pictorialis II as a simple photo gallery manager. I decided to look into how PHP implements the imagecopyresized() and imagecopyresampled() functions. PHP basically just calls GD graphics library gdImageCopyResized() and gdImageCopyResampled() and passes the hard work off to GD (I guess I just didn’t remember it at 3:30AM this morning - then again I’m not sure I’ve ever looked at that particular part of the PHP source). So I downloaded the source for GD 2.0.31. It turns out my uneducated guess last night about the algorithm used for imagecopyresized() and imagecopyresampled() was basically right. The GD functions gdImageCopyResized() and gdImageCopyResampled() are in the file gd.c if anybody really wants to study them. This explains why PHP’s imagecopyresampled() is a bit slower than than imagecopyresized() but produces such prettier results. Imagecopyresampled() basically samples all of the pixels that imagecopyresized() would simply ignore in the resize and averages them together with the weighted colors of the pixels that imagecopyresized() would have directly copied into the new image.

Review: Pictorialis II

Sunday, October 31st, 2004

I’ve been trying Pictorialis II out as a photo gallery. You can see the results of my experiment here (example taken offline - it was getting spammed to death and I’m not using it anyway). For the most part I am pleased with it, but I’ve got a couple gripes: Read the rest of this entry »

Firefox 1.0 RC1 Released

Thursday, October 28th, 2004

FirefoxFirefox 1.0 RC1 was released today. It is not yet on the Mozilla homepage, but you can download it from their FTP site. It includes about 250 bug fixes. Keep in mind that this is just a testing release, so if you aren’t interested in helping test and reporting bugs I suggest you hold off for a few more weeks until the product is officially released (November 9?).

Word on the street is that it starts up faster than Firefox 1.0 PR and renders pages about 2x faster. I can confirm that it does seem to start up faster, but downloading pages seems to actually be slower - pages still render fast once you’ve downloaded them though. Also, most of my plugins seem to be broken for RC1, so if you depend on having your plugins working you might want to steer clear of this release. Afterall, it is for testing before the final release.

All in all I am still very impressed with Firefox. Thanks to all of the people at Mozilla for their hard work. And it looks like their hard work is paying off - they are gaining market share.

What keeps PHP out of the enterprise space?

Sunday, October 24th, 2004

php_med_trans.pngI love PHP. I guess that’s probably because my programming roots are in C/C++. However, you’d think that I would love Java equally then. The fact is, I don’t. Java just seems so restrictive to me (I know, some of you are going to say that’s a good thing, which I won’t totally disagree with). I love PHP because it is wonderfully flexible. It also has a wonderful toolset to go along with it. Things like the Smarty template engine and the PEAR extension repository. This flexibility and toolset makes rapid development in PHP extremely easy. Why is it then that PHP hasn’t penetrated the enterprise web application space? Here are a couple of reasons (and maybe a couple of enhancements to consider, PHP devs): Read the rest of this entry »

Well, here goes nothing…

Thursday, October 21st, 2004

I’m a perfectionist so writing here is going to challenge me. The fact is I don’t like to do anything until I can do it perfectly. That’s why it has taken me 2 weeks to put my first post up. I guess I just couldn’t do it until I had everything laid out like I liked it (and I still have improvements in mind, but I decided I need some traffic first).

This perfectionist tendency means that until my ideas are completely formed I don’t usually express them. This is good most of the time because it keeps my foot out of my mouth. But, sometimes it’s bad because others can’t help me develop my ideas. So, I’m going to try to step out of my box and post sometimes when I don’t have everything already thought out and perfected (not that I ever get anything perfected anyway).

That said, I’ve decided that I need to contribute something to the information treasure-trove that is the internet. I’ve been an internet user for about 10 years now, but have mostly been an information consumer. I’ve rarely posted on forums, never written articles, and basically just lurked. I’m an information free loader. Not that the internet cares, that’s what it’s for after all - free sharing of information. I guess I just felt like it was time to start producing content rather than just consuming it. Read the rest of this entry »

Hello world!

Sunday, October 10th, 2004

Welcome to WordPress. This is the first post. Edit or delete it, then start blogging!