OpenImage - JavaScript []

francais
.

OpenImage is a piece of JavaScript code designed to display images in a nice environment whithout having to design one single "container" HTML page for each image.

New : version 1.3 now includes a full-screen mode !
.


Description

Version: v1.3 of Mar. 20th, 1999


If you have lots of images to present on the Web, an Intranet or an Extranet, and would like to display each nicely, with

  • a nice black background to improve contrast,
  • a slick white margin (or no margin in full-screen mode),
  • a title,
  • and a copyright mention,

there was no choice. You had, for each image, to design and write a HTML "container", thus raising the following issues :

  • as many HTML pages to write as you have images to display
  • clumsy management of how to return to the originating page and link
  • maintenance of pages, especially if you decide to modify background design

All of these have been solved, thanks to "OpenImage.js", a free JavaScript solution offered by Luc PUGEAT and Philippe DEWOST

OpenImage needs just to be installed once (in the - HEAD - section of your page or - better - frameset) and may be then called from any page. Parameters are :

  • name of the image file,
  • new window's name,
  • width and height (in pixels) of the black area surrounding the picture,
    (set both to '999' to display image in full-screen mode)
  • new window's title.

The image name must be formatted as follow 'Name.height_width.format'. OpenImage can then :

  • Calculate the size of the new window
  • Open it and set its title as requested
  • Prepare a black background, a white margin, and the area to welcome your image
  • Display your image in that area.

A single click on the image will close the window.

Demo : if I want to show a 150 by 360 pixels picture called 'phil70.jpg', I just have to rename it as 'phil70.150_360.jpg'. The reference to get it displayed with a 30 pixels wide black background will just be :

<A HREF="javascript:openImage(self,'phil70','img/phil70.150_360.jpg',30,30,'Resultat du test')">test</A>

Which gives : test

Full Screen Mode : if I want to show the same picture above but in full-screen mode, eg have the window cover the maximum screen real estate with a black background, the code is then :

<A HREF="javascript:openImage(self,'phil70','img/phil70.150_360.jpg',999,999,'Resultat du test')">test</A>

Which gives : test

Download

MacOSAAPL ,WindowsMSFT



OpenImage is available as a downloadable archive only . All you need is to fill in the download form presented to you, which should not exceed 30 seconds..
  • OpenImage is made available as a software archive, containing the script itself, and a Readme file (very similar to what you are currently reading).
  • To decompress the archive (in ".zip" format), you need a decompression program [Mac | PC].

 

Usage, copyright, legal stuff


  • OpenImage is released in electronic format only. Author won't send any disk.
  • Distribution permitted as a complete archive only. OpenImage may be included in any CD-ROMs as soon as you have my consent.
    Before any redistribution (online or offline); please make sure that you have the latest version available by comparing the last modified date on the "readme" file and the date on the online file available at http://www.dewost.com/libre/openimage_js_e.html. If needed, download a fresh copy of the archive.
  • OpenImage is 'logoware'.
    OpenImageIf you use it, please put the OpenImage logo anywhere on your web site, andhave it link to:
    http://www.dewost.com/libre/openimage_js.html
    An e-mail to the authors will always be welcome...
  • License is valid and free as long as you use the script provided as is, and especially do not modify the comments included within it.
  • The author waives any responsibility and liability for any damages that could occur on your system due to the presence of OpenImage on your hard drive or web site.

 

Installation


Expand the OpenImage archive, open the script 'openimage.js' with a text editor and copy it in the <HEAD> section of the HTML page where you'd like to display pictures from. Just use the syntax explained above and you're done.

Hints :

  • When managing a complex site, install OpenImage in the frameset and call it from any page using 'top.openimage(...)'.
  • Do not forget to rename all your images by inserting the 'width_height' information . Mac Tools to perform automatic renaming will be available soon on the site (PC volunteers welcomed)