IMGTOOL version 0.92d, where the 'd' stands for DERP!

This is a quick and dirty release, motivated by the fact that JPEG encoding
was completely broken in the last version. Instructions need updating and
testing needs to be done, but several other things have changed as well:
  -changed some variable names so I could build with FBC 0.23 in Ubuntu 8.1
  -loading/saving custom color space/palettes (what the .PAL files are for)
  -palette viewer
  -change screen modes on the fly

What is it?
  IMGTOOL is a bitmap editor written in FreeBASIC which runs on DOS or
  32-bit Windows

What are the system requirements?
  Minimum: 486DX, VGA, ~8MB RAM, mouse is needed for some functions
  Recommended: 686 class CPU, SVGA, 64MB RAM (should be adequate for
                5MPixel images)

What is IMGTOOL.INI?
  This is a text file which contains screen mode settings. If it is not
  found in the path containing the executable, it will be created with
  default settings.

  supported modes:
    320x200 VGA mode
    320x240 ModeX mode
    VESA modes (8/15/16/24/32 bits per pixel)

  non-standard screen sizes are possible when running in a window (Win32)

What file formats are supported?
  BMP - 8/15/24 bits per pixel
  JPG - most common files (no progressive scan)
  PNG - 4/8/24 bits per pixel (no progressive scan or static Huffman tables)

  note: when saving JPG, image size is truncated to multiple of 8x8

How does the UI work?
  Most of the functionality is contained in menus which can be accessed
  by clicking the menu bar at top (file, edit, view, colors) or pressing
  the ALT key. Use the left mouse button to select a menu item, or click
  and hold the right button to drag a menu across the screen. Menu items
  have various functions including opening a submenu, performing some
  action, or merely displaying information. Keyboard controls can also
  be used to navigate menus. Pressing F1 displays a summary of available
  keyboard shortcuts. In addition, most menu items contain a capital
  letter which indicates the shortcut key that can be used when that
  menu is in focus. Exceptions are coordinate groups (press number 1),
  "close" (press '-'), and "confirm" (press '.').

  File - this menu contains functions for loading/saving files and shows
  the dimensions of the current bitmap.

  Edit - contains various functions for modifying the image

  View - shows the current zoom and scroll positions with options to
  automatically scroll/zoom when loading a new image

  Colors - contains options for color adjustment, depth reduction,
  dithering, and palettization

What is the "tool" displayed at the upper left?
  The mouse has different functions depending on which tool is selected:

  when no tool is selected, the mouse is used to scroll and zoom. Click
  and hold the left button to scroll the image. Click and hold the right
  button to zoom in/out. Click and hold both buttons to change the pixel
  aspect ratio. These are temporary modifications, applied in real time,
  and do not change the image data stored in memory.

  selection - Click and drag to define a rectangular area to use for
  a crop or copy operation. Right-click to cancel the selection tool.

  paste - left-click to paste an image at the cursor location

  pen - hold the left mouse button to draw on the image

  FPS - not really a tool... In benchmark mode, the framerate is displayed.

  line - left-click to place first endpoint, click again to draw a line
         (moving the mouse while holding the button will tend to draw
          continuously)

  get color - left-click to read a pixel's RGB values into current pen color

What is the "B" displayed momentarily in the upper left?
  The "B" indicates that the program is busy applying certain modifications
  (eg. color space conversion) to the image before it can be updated on the
  screen.

What does each item in the various editing menus do?
  Edit menu:
    flip X/Y - flips the entire image

    benchmark - continuously reloads and re-displays the image for measuring
    the speed of the process (any prior changes will be lost!)

    resize image - changes the dimensions of the image stored in memory
    using a bilinear weighted pixel algorithm with fixed-point integer
    math (9-bit fractions). (This is the same algorithm used for zooming
    the display)

    selection tool - enables the selection tool (for defining a rectangle)

    crop - remove everything outside the selected area

    copy - save the contents of selected area to a temporary file

    paste - the contents of the temporary file can be written to the image

    alpha - determines the degree of transparency/opacity used when pasting

    transparency - if checked, background pixels in a pasted image will not
                   be drawn (the value of the upper left pixel in the pasted
                   image is assumed to be the background/transparent color)

    drawing - opens the drawing submenu

    rotate right - turn the image 90 degrees clockwise

    rotate left - turn the image 90 degrees counterclockwise
  
  Colors menu:
    adjust color - this check box controls whether the contrast, brightness,
    and red/green/blue adjustments will be applied. The changes are temporary
    and can be further adjusted or turned off, however the adjustments will
    be shown on screen and will be made permanent when saving a file.

    color space (submenu):
      adjust depth - as with the "adjust color" check box, this check box
      determines whether the color space settings are active

      levels for each component - allows the effective color depth to be
      constrained. Whereas a 24-bit RGB bitmap has 8 bits per component,
      allowing 256 intensity levels (including 0/off), changing the values
      to 32 would simulate 15-bit RGB. Setting the values to 8, 4, or 2
      could be used to simulate the color depth of old computer/game systems.
      (BUG: currently some non-power-of-two values will cause problems)

      intensity bit - this is basically an additional LSB that applies to
      all three components (as seen on 16-color EGA or the X68000)

      greyscale - shows a color image as black-and-white

      dithering - where the currently configured color depth is unable to
      represent all colors specified in the image, pixels are modified in
      a checkerboard pattern to increase the number of perceived colors

      floyd/steinburg - a more complex dithering algorithm which distributes
      error across several pixels

      note: all color adjustments including dithering are calculated before
      zooming. If the display is zoomed out then the dithering effect will
      be hidden.

    color palette (submenu):
      use palette - determines whether palette settings are active
        
      pal size - number of colors in the palette. If the number of colors
      in the image is greater than the size of the palette, an algorithm
      will reduce the number of colors. (This can be very time consuming
      if the initial number of colors is very large.)

      multipalette - allows the image to be divided into multiple areas
      with their own independant palettes
      (not yet implemented)

      # of pals - maximum number of palettes to be used for multipalette mode

      pal zone size (width/height) - specifies the size of the area to which
      each palette must apply

    "custom palette view"
      note: if the program is running in an 8bpp screen mode then a fixed
      RGB 242 palette is used for the display which prevents images from
      being shown accurately. However, if a color palette is specified which
      contains 256 or fewer colors, then full screen mode (F11) can be
      used to temporarily display the image with the calculated color
      palette instead (only at 1:1 zoom)

What is batch mode?
  IMGTOOL can perform some operations automatically when it is launched from
  the command line using the following syntax:

    IMGTOOL batch [commands]

  available commands:
    oFILENAME - opens a file
    sFILENAME - saves a file
    r - resize image
    p - paste image (user must have previously launched the program and
        copied an image)
    4 - resize to quarter (cut image dimensions each in half)
    vtNUM - set file format for saving
      8 - 256-color BMP (currently not possible in batch mode)
      16 - 32,768 color BMP
      24 - 16,777,216 color BMP
      70 - JPEG
      (default is whatever file type was last opened)
    vaNUM - set alpha
    vqNUM - set JPEG quality ranging from 1 (lowest) to 6 (highest)
            (default is 4)
    vvNUM - set vertical parameter (used for resize/paste, default is 192)
    vhNUM - set horizontal parameter (default is 256)
    vlNUM - set long side, calculates H and V from current image dimensions
      while maintaining the original aspect ratio

  example:

    IMGTOOL batch oFILE.JPG 4 vq3 sSMALL.JPG

    This command line will cause FILE.JPG to be opened, shrunk to a smaller
    size, and then saved as SMALL.JPG with a JPEG quality setting of 3.

What has changed since the last release?

  new in version 0.92:
    -can load some PNG files
    -file list scroll bar drag
    -tweaked mouse routine

  new in version 0.91:
    -JPEG quality setting
    -line tool, get color, paste transparent
    -batch mode
    -BMP loader bugfix and speedup
    -bugfix for F3/F4 commands
    -bugfix for loading grayscale JPEGs
    -dithering algorithm improvement
    -color reduction speedup
    -filesystem browser for OPEN dialog
