Been playing with manipulating images with PHP all night, something I haven’t done much since I had the fancy capital thing on this site, and that wasn’t as much manipulating images as generating images using truetype fonts. With GD included PHP is very easy to use for this sort of thing. I’m storing the images themselves in the database as BLOBs, along with a bit of meta-data I grab from them when they’re uploaded using a web form. I have a small PHP script that returns the images from the database, resizes them to whatever width I specify in the query string, and does “funky” caching so if the image has already been generated/grabbed it returns just about as fast as reading it directly from the filesystem would. I have to have some fun because the site I’m doing this all for uses tables.
Speaking of tables, everyone head over to Big Pink Cookie and see how there aren’t any there. I recreated the basic layout in CSS and then helped Christine tweak it till it became the beauty you see before you now. If you’re curious, here are some of the changes I made:
- The header graphic is now a
h1tag with the text hidden and the graphic as the background.
- The latest pictures from Pixelog at the top of the page are now an ordered list, styled to display horizontially through CSS.
- There is a “rapper”
div(gotta have some flava) of a fixed width centered using
margin: autoand a IE workaround.
- Inside that there is a content and menu
div, the menu has a fixed width and is floated on the right.
- ms that were previously all preceded by “::” are now unordered list items with the :: effect recreated through a list image. Now if Christine wants to change the way her menu looks she just has to edit one file instead af change hundreds of double colons.
- It now loads really, really fast. Especially when compared to before.
It might still have a stray error here or there that’s keeping it from validating, but give it a few days and all those should be ironed out. More importantly, it validates in spirit. I can now add Christine to the list of site I check when I’m browsing on my Palm over a 9.6k connection. Best of all, I think CSS no longer makes Christine’s eyes bleed, and she can see Tantek again.