# GBM plugin for Netscape/Mozilla/Firefox/SeaMonkey

## Introduction

This is a plugin for the Webbrowsers Netscape, Mozilla, Firefox and SeaMonkey available for OS/2 and eComStation that extends them with the support of reading all bitmap formats supported by GBM.DLL.

For being able to use it, the following additional files are required:

- Netscape, Mozilla, Firefox or SeaMonkey
  The plugin has been tested with Firefox 1.5.0.x and 2.0.0.x, SeaMonkey 1.0.x and 1.1.x, Netscape 4.61 and even Netscape 2.02 but it should work with other versions as well. Printing is only supported on Mozilla/Firefox/SeaMonkey.
- GBM.DLL (GBM Bitmap Format Handler) version 1.50 or higher
- Optionally GBMDLG.DLL (GBM File Dialog)

Note:
GBM.DLL version 1.41 must not be used as it contains a compiler optimization issue that reduces stability. When used together with the GBM plugin, the browser might crash when opening bitmaps. Please upgrade to GBM.DLL version 1.50 or higher.

Note:
This plugin requires so far that the browser cache is enabled. Further version might be able to directly stream the images into the system memory.

## Supported features

There is the embedded mode with reduced functionality and the fullscreen mode with full functionality. Both viewers automatically detect the file format, so also wrongly named bitmaps often found in the world wide web can be shown.

Fullscreen mode viewer with a load of features:

- menus, popup menu, scrollers
- variable scaled preview
- transformations mirror/transpose/rotate
- multipage navigation
- high quality scaling algorithm for improved appearance
- bitmap format info dialog
- save the shown page to any GBM supported bitmap file format
- uses GBM File Dialog if found, otherwise OS/2 File Dialog is used (dialog contextual help is available)
- English and German localized with autodetection via LANG variable

Embedded mode viewer with reduced functionality of the fullscreen mode viewer:

- popup menu
- transformations mirror
- multipage navigation
- high quality scaling algorithm for improved appearance
- bitmap format info dialog
- save the shown page to any GBM supported bitmap file format
- uses GBM File Dialog if found, otherwise OS/2 File Dialog is used (dialog contextual help is available)
- printing of embedded bitmaps is supported on Mozilla/Firefox/SeaMonkey
- English and German localized with autodetection via LANG variable

## Installing GBM for Netscape/Mozilla/Firefox/SeaMonkey

Simply copy `npgbm.dll` into the plugin directory of your browser. Please check the requirements listed for `gbm.dll` above. Copy `gbm.dll` to a directory somewhere in your LIBPATH (defined in CONFIG.SYS).

The plugin will try to use the GBM File Dialog (`gbmdlg.dll`) if it is found somewhere in the LIBPATH. The GBM File Dialog online help (`gbmdlg.hlp`) is used if it is found somewhere in the paths defined by HELP environment variable. If `gbmdlg.dll` is not found, the standard OS/2 file dialog will be used. Save options for bitmap export cannot be specified in the OS/2 file dialog and thus the plugin will use the default export options of each bitmap format.

The zoom quality the plugin uses to show images can be customized by settings in the configuration file `npgbm.cfg`. Simply create the configuration file right beside the plugin DLL `npgbm.dll` using your favourite ASCII text editor and add the options. There is also an example file included in the package. You can use the `#` sign to start a comment. Everything behind this sign is ignored on this line. If the configuration file does not exist, the plugin will use the default options.

Example of `npgbm.cfg` :

    # The scaling algorithm can be one of the following:
    # scaler={simple,nearestneighbor,bilinear,bell,bspline,mitchell,lanczos}
    #
    # By default the simple scaler is used. This is the fastest scaler which uses
    # less resources compared to all other scalers. Though it provides acceptable
    # quality for normal viewing.
    scaler=simple

Testing the plugin:
You can test the correct installation of the GBM plugin with the links provided below. You need at least GBM.DLL version 1.42. Only then the PNM images will be shown.

- Show embedded TIF and PNM images
- Show a TIF image in fullscreen mode

## License of GBM for Netscape/Mozilla/Firefox/SeaMonkey

Copyright (C) 2006-2008 Heiko Nitzsche

This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

## Screenshots

SeaMonkey showing embedded PNM and TIF images by using the GBM plugin:

SeaMonkey showing a PNM image fullscreen by using the GBM plugin: