HTML Generator


The basic idea behind HTML Generator is to enable you to quickly create a web page with a group of JPG or MPG/WMV files. I don't have a lot of time to spend maintaining a web site, so I wrote this to make it quick and easy. To use it you just copy one or more JPG/MPG/WMV files to a new folder on your web server. Then run the utility and it will resize/requality your JPGs - this is important because a lot of cameras will create huge pictures (2272X1704 pixels and 3MB in size) that aren't suitable for a web page. The quality can be reduced, often to 1/10th the original size, which will make the page load faster - no one will ever notice unless they want to print the picture out - in that case they should ask you for the original.

After the utility has ran, you will have a new set of much smaller-file-size JPGs in your folder, plus you will have a new subfolder named small which will have a set of thumbnails. Finally, a basic HTML file is created that displays the thumbnail photos that link to the full size picture. You can then edit the HTML to add text or whatever you like. This utility just does the hard work of creating thumbnails, resizing and creating the basic HTML.

To Install

  • Save the HTML Generator program to your hard drive. This is the utility Craig wrote.
  • Open the ImageMagick ZIP file and extract all files to your hard drive somewhere. This is a freeware set of image manipulation utilities that my program uses to resize JPGs.
  • Start the HTML Generator program
  • Find the folder with mogrify.exe (probably C:\ImageMagick-Win2k) and enter it into the box labelled ImageMagick folder. These programs are used to shrink and re-quality (make the file size smaller) your existing JPGs.
  • Save the style file main.css to the root folder of your web server - this gives your website a consistent look and feel. You can change this one file and it affects your whole web site as long as you put this at the top of each HTML page (the HTML Generator puts this line in each generated HTML file):
    <link REL="stylesheet" TYPE="text/css" HREF="/main.css">

  • Save the file movie.jpg to the root folder of your web server. The HTML Gen uses this as the link when you have an MPG or WMV file in the folder.

    To Generate HTML pages

  • Enter a Title for your web page
  • If you want to resize your JPGs, check the box and choose a new size. 1024X768 works well for the web
  • If you want to requality your JPGs check that box and choose a new quality level from 30-100. 75 is a good starting point - it will reduce 2.5MB JPGs down to about 150K to make for faster downloads.
  • Check the create/recreate thumbnail checkbox to create thumbnails for the web page.
  • In the folder field, enter the folder path for a set of JPGs or MPGs that will be part of the new web page. You should always copy these files from somewhere else. Don't put your originals in this folder since they will be modified. This folder will usually be a subfolder of your web server root, so the web page will be active as soon as you finish. Of course you will need to tie this web page into the home page so people can find it.
  • Click Start/Stop to begin the process of resizing and creating the basic HTML page. After it is done you can take the basic HTML page that was created and modify it. If you want to add more pictures later use a temporary folder to create the basic HTML and pictures (regular and in the small directory) and then cut and paste the JPGs into the original folder, and cut and paste the temp HTML into the original HTML.