This day I finally completed the DHTML-Image editor. I cleaned up the code and made a PEAR-compatible class out of it. It currently depends on the Template_PHPLIB class and needs the GD Library. And after work, I went to Tate Gallery. Both is covered in depth, as usual, in the extended entry.
Part 1: Work
In its basic interface, you see your the fullsize image and a fixed size cropping area. Utilizing CSS and DOM-compatible JavaScript you can drag the cropping area around within the image. The part outside of the cropping area is displayed transparently, and only the portion inside the area is showing in actual color. So you can easily see which area will be cut out of your image. There's an option to toggle the size of the cropping area horizontally and vertically. In code, this means you can define two images as the cropping area which can get changed.
You can then zoom the image (without manipulating the original image) from 0.1 to 2x the size of the image using a slider. Then the interface features a "Resize to fit longest side to cropping area" and a "Resize to fit completely inside cropping area" button.
After having decided upon the cropped area, the actual cropping is done using the PHP code.
If you have JavaScript enabled, the whole interaction thing works without reloading the page, so everything is done on the client size. Even automatic resizing and zooming. If you don't have JavaScript enabled, there's a fallback mechanism to PHP. You can then move the cropping area around using form-based input controls, and do everything you can do without JavaScript. Of course, the page gets send to the Server every time you change it.
And all of that is done in only 465 lines of PHP-code (including 44 lines of comments) and 302 lines of JavaScript. But currently the interface still looks like one big ugly mess. It will get touched up and then implemented into the project I was helping with the guys at
Sonnd. After that, we can finally submit it as GPL (or PEAR-style) licensed open source and hopefully I will get some feedback on it. I really like it, as you can see.
Part 2: Even more fun
So after having achieved such a highlight at work, I went to see the Tate Gallery of Modern Art today. I straightly took the bus to the Banking District to not lose any time.
I left there and went to the Tate Gallery using the Millenium Bridge. I had a great view of the Thames by going over this bridge and took some fotos. Really hard to get some good ones on that dark lighting with my digital camera.
As I got towards the Tate Gallery, I was once more impressed by the architecture around. There was a huge black balloon-statue in front of the building, a giant Pinochio with a square head sitting on a couple of books. Whatever that meant.
I went inside the Gallery (which didn't cost any entrance fee, opposite to what I expected) and first saw a fog-covered entrance hall. Inside there was a even greater sun-like light emitting orange rays, which interacted great with the fog. The gallery had about 7 levels, of which 3 were only caffees. I went straight up to the first gallery-level and found some art there. At least, that was what I was told: Most of the pictures or sculptures gave nothing to me. Many sprinkles on tiny frames, lots of colors and grotesque statues. I don't seem to be getting anything out of this kind of modern art. Luckily I discoverd some few pictures I liked (from Dali, and some other famous ones) or some statues of Giacometti (sp?).
Anyways, I emerged from the building quite soon and took a look at my map to decide where to go. Obviously, I marked for myself to see the London Eye, which is a giant wheel-like structure ("Riesenrad") where you can have a look over London. I went along the Thames, a great walk to see all the lit-up hotels and restaurants along the water.
I went by some other huge galleries, the IBM building and the Royal Festival Hall, which didn't look that great to me, as I had already seen so much more impressive buildings the other days. However, Westminster Abbey looked cool in the dark, like something beamed straight out of a different century.
As I didn't find any ticket office to get inside the London Eye, I didn't further investigate how to get there and lost interest in that. Instead, I went to McDonald's to get some food and in the same building I found a Namco Arcade/Gaming Hell. But that offered nothing special either, which made me decide to go back home and come back the other day where I could make more pictures.
This way I got to take my first Underground Trip for this visit to England, going from Westminster to Liverpool street. I had to wait 15 minutes for my sub to arrive, which made me even more favor taking the Bus, where I can also see more of the city.
And that's it: Another day went be. Vaporized. Gone in an instant.