Image::Magick

http://www.imagemagick.org/www/perl.html

"PerlMagick is an objected-oriented Perl interface to ImageMagick. Use the module to read, manipulate, or write an image or image sequence from within a Perl script."

Apache::MiniWiki uses this module to automatically build thumbnails of inline images. Resizing doesn't even begin to scratch the surface of what it can do, though.


Applied to MiniWiki

I'm installing the Image::Magick right now from CPAN. Tried the one in Debian, but it's all broke and referencing non-existant libraries. Image::Magick is very cool, but requires a lot of graphics libraries and development packages. In the process of doing that, I ran out of space in /usr, which was circumvented by cleaning out /usr/src/linux which is 140MB. I'm using Image::Magick to add thumbnail support to MiniWiki. Yep. MiniWiki will soon have support for attaching files (PDF, .gz, etc) and inline images. See http://www.nyetwork.org/wiki-beta for an example. Still in progress though -- we're adding code now to thumbnail big images, for layout and bandwidth considerations.

After a couple of hours of coding and testing, MiniWiki now has support for attachments and images. See my CarPictures, vmware, and KDE for examples. Automatic thumbnailing is built in, using Image::Magick (one of my many favorite Perl modules). Basically it checks to see if an image (JPEG/GIF/PNG) fits into a 600x400 boundary... if not, it scales it down until it does fit. JamesFarrell came up with the idea and coding for uploading/viewing binaries/images. I did the thumbnailing stuff since I wanted it. --Wim

Yowza. I want this feature in my MiniWiki :-) Any idea when the next release might happen? I'm doing some extensions on MiniWiki but I guess I should check first what you guys are doing... in particular I want to disallow public editing but allow adding to all pages, using some ideas from chiq_chaq. Another idea I had is to get rid of the (save) part of the URL, detect saves using the parameters instead -- this prevents having two different URLs bring up essentially the same document, and may also help prevent robots from running amok. A further thing is another idea borrowed from chiq_chaq, which is enabling off-site links to have a name other than their URL, by prefixing the URL with a "quoted string" http://... --jammin

Interesting that you ask. Last night I presented to MiniWiki to FVLUG, the local Linux user group. I already have a shell open, ready to tar things up and release the latest. --Wim


Fun with ImageMagick

Tonight I wrote Apache::TTF, another mod_perl handler. What it does is generate a GIF/JPG/PNG image (on the fly!) for given GET arguments. The options include: text, pointsize, antialias, width, height, x, y, and align. Transparency is always turned on.

For an example, see: http://www.nyetwork.org/fonts.epl. This is an Embperl page which loops through all my TTF fonts, and creates a Nyetwork.org logo for each one. Now too choose one out.

Here's another example: http://www.nyetwork.org/miniwiki.html. IsMiniWiki old enough to have it's own logo?


See also Perl, CPAN, WikiImages