NAME

mthumbnail - MagickThumbnail generate thumbnails and html index page from directories of images.


SYNOPSIS

mthumbnail [options] [directory]+

mthumbnail stands for Magick Thumbnail. This name is because of the use of ImageMagick/convert command.


VERSION

MagickThumbnail : mthumbnail : 0.002


CHANGES

Added -n option to normalize picture to adjust color, brightness level.


DESCRIPTION

MagickThumbnail is a perl script that let you organize a directory with some images in gif, jpg, png or any format, to publish under some place in the Internet.

It is really easy for anyone to modify this script to allow some user preferences, because Perl scripts are pretty much readable.

It is really small, because of the use of Perl, efficient enought to parse Mo of image files, because it rely on ImageMagick/convert command. Versatil, because it can easily understand up to 68 images formats and as nice features. It really let you make nice, soft and light Web gallery into a few instant. Just one command to make the gallery. After this think about using sitecopy to post it to the Internet, if needed.

MagickThumbnail will do the following for you :

HTML index page.
Generation of HTML page, with thumnail. They are organized in rows, in HTML table. You can choose number of colums. Defaults options for generated HTML is in perl script. So change it in the rigth place if needed.

Thumbnails
MagickThumbnail easily generate thumbnail of any kind of image. You can specify thumbnail size with geometry (-g) option. It can read 68 major image formats. For now, just gif, jpg and png formats are managed.

MagickThumbnail will generate thumbnail only when it is necessary, it just compare file modification times. Thumbnails filenames start with TN_. MagickThumbnail will not generate thumbnails of thumbnails.

Resample
You can make image size smaller for faster access on the Internet. This is done with resample option of MagickThumbnail.

Description files
Some programs like ACDSee (Windows) can make description of images in descript.ion files. MagickThumbnail use those descriptions files to make HTML index file more informative. Use the HTML TITLE tag to describe the thumbnail.

There is two descriptions : 1/ HTML ALT tag, 2/ a short description in the bottom of the thumbnail.

In the bottom of thumbnail, if there is no description for a file, MagickThumbnail will default to filename. It will truncate description if to long. If description contain a field separator ’ - ’, it will also truncate before this special char.

HTML ALT tag is a good way to give information. For now, you can see in this order filename, file date, file size, and description if it exists. Now we use TITLE tag

Recurse Directories
You can give MagickThumbnail one or more directories, and it can recurse for any subdirectory.

Change caps of filenames
MS-DOS filename may have strange use of letters. Under Unix/Linux Web server, you will have problems, if letter case is mixed. With MagickThumbnail, you can bypass this problem by changing filename to nice values, use -C option.


OPTIONS

-h
This will display the help screen.

-v
Turn on verbose mode, tried to display information as nicely as possible.

-R
Will recurse for subdirectories, and make an HTML index page (page.html) for each subdirectories.

-r
Resample image file, to reduce size. See -q option, for quality.

-n
Normalize image to get better colors. Picture will automagicly look very nice with right colors and contrast. This is a very nice function.

-d
This is debug option. May be usefull for time developpement. Will normaly not be of any effect in normal use.

-C
Try to change filename letter caps. Usefull when letter cap a mixed, because of MSDOS.

-f
Force generation of thumbnails. Don’t check file modification acces time. Usefull when you want to change the size of thumbnails with -g option.

-c columns
Change number of columns. Defaut is 5.

-n
Normalize image quality. This is a contrast enhancement technique.

-q number
Quality used for resample option and for thumbnail generation. See convert command. It just look like a percentage. 75 seem to be a good ratio for quality and size. You can play with it. This option will apply for JPG, (PNG) not for GIF files.

-g geometry
Size of thumbnails in pixel. Default to 120x120. Image will enter in this max rectangle. Thumbnail will not be distorted.


EXAMPLES

Some very simple examples.

$ thumbnail mydir
Will generate page.html in directory mydir for every image found in this directory. Will not recurse for subdirectories. All defaults options apply.

$ thumbnail -v .
just add verbose mode but for the current directory.

$ thumbnail -v dir1 dir2
you can do with multiple directories at the same time.

Every options are pretty to understand, so just play with them. I don’t need to tell you more.


DEPENDS ON

MagickThumbnail depends on ImageMagick/convert command. So you will need to install this command if you don’t have it on you system. See rpm -qa rpm -qa | grep -i ImageMagick on Linux systems.

MagickThumbnail work with perl 5.005, convert 4.2.9, under any Unix systems. For Windows place, see if you can find ImageMagick. There is


KEYWORDS

perl thumbnails convert resample ImageMagick


SEE ALSO


TODO

Here are some idea for futur of MagickThumbnail


AUTHOR

Marc Quinton / http://quinton.free.fr/MagickThumbnail/

If you really need to contact me, try to guess my email. It’s really easy. It don’t want to publish my email to much, because of mail spaming. It’s my name@free.fr.

Download at : http://quinton.free.fr/MagickThumbnail/download/

Screenshot at : http://quinton.free.fr/MagickThumbnail/demo/

If you like this utility, feel free to make many links, send me some mails, postcards, money, chocolate, and what ever you want.

Any comments are welcome.


CONTRIBUTIONS