Javascript Image Viewer



Home

The Javascript Image Viewer is an experiment in Javascript and PHP. I basically wanted to learn some more of javascript, and what better way than to write an application. Also, I was having problems; since the the image viewing tools installed on my machine(EOG, konqueror, nautilus, etc....) weren't able to handle a large number(700) of images in one directory. So I thought of writing my own that worked in a browser rather than finding one online.

Some features:

  1. Splits the images across pages. Shows links to each page.
  2. Shows thumbnails -- 16 per page.
  3. Clicking on thumbnails loads the image and takes you to the top of the page.
  4. Allows you to rotate the image 90° Clockwise and Counter Clockwise any number of times.
  5. Runs on the web browser.
  6. Remote users can browse your local files!
  7. Automatically resizes images to 800X600 or 600X800 pixels while displaying.

Requirements:

  1. Apache web server
  2. mod_php (v4.4.0 or more)
  3. Javascript enabled web browser(tested on Firefox 2.0.0.14)

How to Install?

Installation is very simple. Just unzip the files and place them in a folder in your web-server's root directory.

For example, it would be something like /var/www/htdocs/imageviewer/.

Then, just type: http://localhost/imageviewer/ and click the Browse button to select any file in the directory which contains all your images.

Since there is no way that I know of in which users can select a directory from a web form in HTML, I am using this method. The application will automatically search the entire directory for image files of the type png, jpeg and gif and display them all on pages.

Enjoy!

You may download the source files from here.



Hosted by www.Geocities.ws

1