Thumbnailing with NetPBM and Movable Type
One of the most useful applications of MT is to set up an online pictures diary and using all the in-built features for photosharing. Problem is that despite mt-check.cgi recognizing Image::Magick on your server, you cannot create thumbnails (you only end up with the dreaded 500 server error). Guess what, just as efficient as imagemagick are the NetPBM libraries and this little tutorial should have you working in no time.
So you have MovableType and cannot get it to support thumbnailing with either Image::Magick or with NetPBM? This is a tutorial to help you work with NetPBM,
Imagemagick is for another day. (PS: From my experience, there is no noticeable
difference in the operational efficiency or speed of using either, in case that
is what you were worried about).
So, let's get cracking.
- First, you need NetPBM binaries. Many webhosts may have installed the libraries
but the binaries for NetPBM are small and cute, so it doesn't really hurt
to have your own. Grab the NetPBM binaries from here.Note: This is in Windows ZIP format, if you need gzipped versions please write to
me, or grab them off NetPBM's
website. - Unzip these files (they will create a NetPBM folder) and ftp the folder
to your web server. Let us say you upload them into your folder within your
MT folder as follows:/home/DOMAIN/www/mt/netpbm - Now, you need to set CHMOD all files inside netpbm to 755 (executable). Assuming you are into your netpbm folder,
chmod 755 *
- To make sure that the binaries are in proper order, try checking on some of the included binaries:
./jpegtopnm –version
or
./pnmcut –version
- Assuming that you see the info about the utils you tested (as above), we now need to make sure MT recognizes *your* NetPBM. TO do this, open your mt.cfg and modify the following two options:
ImageDriver NetPBM
NetPBMPath /home/DOMAIN/www/mt/netpbm - Upload your mt.cfg. Let's check if MT can indeed find your NetPBM. From within your MT folder (one up from NetPBM folder), execute the following command in your shell – perl –Iextlib –MIPC::Run –e 1
- If you are lucky (and you should be, really, in most cases) then you are
all set — you can try the UPLOAD FILE from your MT now. If you have problems
here, let me know. It is usually related to IPC::Run but hopefully this shouldn't be required.TIP: If you encounter IPC errors, ONLY THEN follow the next step. - Perform the following steps ONLY if you experience the IPC error outlined in step 7 –
- Get IPC files: http://sniptools.com/av/IPC.zip
- Unzip it, it will create an IPC folder.
- Upload the IPC folder as-is to your MT/extlib directory.
Time to start thumbnailing!
RECENT COMMENTS