Ŀ
Future.Library Import Addon v1.0 readme file       (QB45 and PDS71 release) 


 This is a small addon/replacement/extention library to the IMPORT routines
 that was included in the FL v3.5 release.

 The current import library has major problems when importing images to 8 bit
 screen modes. It did not handle loading of multiple images to the same screen
 where different palettes was nedded for each image(bmp/pcx/gif). This library
 corrects this problem, plus it includes some additional features like full
 palette control for image loading, user defined palettes and image resizeing.

 Requires:

   1)Future.Library v3.5
   2)Future.Library xms module 

 This release consists of one file, flimpext.lib. To use the library all you
 have to do is include the file when you make a build with the FL builder.

   1)copy the library to your directory where you have the FL builder
   2)run the builder (flbuild.exe)
   3)click on SETUP and select LIBRARY
   4)enter the name of the library into one of the four boxes in the window.
     Enter flimpext.lib for QB45 or flimpex7.lib for PDS71 builds.
   5)also enter 'files\shared\xms.obj' into one of the four boxes
     (or simply include the xms module by clicking on the box for xms support)
   6)now build the library 


   Before you can call any routines from the IDE you also need to add
   the basic include file to your module. This is done by adding:

   REM $INCLUDE: 'flimpext.bi'


 The routines are called just like the old ones exept that '.ext'
 must be in the name of the routine you call. There are also some additional
 switch routines that can control the state of the library and they start with
 'Set##...##' where ##...## is an identifier name for the routine.

 Example:

  Future.LoadBMP.ext filename$, x, y

  SetMaxColors 128

 Included SUBs/FUNCTIONs: 

   1)import routines

     Future.LoadBMP.ext 
     Future.LoadPCX.ext 
     Future.LoadGIF.ext 
     Future.OpenAGif.ext 
     Future.putAGif.ext 
     Future.CloseAGif.ext 

   2)switch routines:

     SetMaxColors 
     SetPalStart 
     SetUserColors 
     SetPALOPmethod 
     SetAutoOffset
     SetScale
     SetScaleSize

 Description:

 -Future.LoadBMP.ext

   Loads a BMP file from disk, the file format can be 1bit-24bit and
   must be uncompressed.

 -Future.LoadPCX.ext

   Loads a PCX file from disk, the file format can be 8bit or 24bit.

 -Future.LoadGIF.ext

   Loads a GIF file from disk, the file format can be 4bit or 8bit.

 -SetMaxColors

   A switch that controls the maximum amount of colour attributes
   a image can have in an 8bit mode. Range is 2 to 256.

 -SetPalStart

   A switch that controls the stating offset of the loaded palette
   used by a BMP/PCX/GIF image. Range is 0 to 255

 -SetUserColors

   A switch that controls if the loaded image should use the system colours,
   that is colours that are already defined on the palette, or if it should
   use and load the image palette. Range is 0 or 1, 0 for OFF and 1 for ON.

   Using system colors will decrease the loading time in 8 bit modes. But the
   result might not be so good unless you pre select your palette with great
   care. One other useful feature in using predefines palettes is the making of
   grayscale imaging or using red, green or blue shades to extract red, green
   or blue components of an image. Another feature is that you simply don't
   have to worry about the palette since the best colors for an image are
   picked by the optimizer.

 -SetPALOPmethod

   A switch that controls the way the library should optimize the palette.
   Range is 0 or 1 or 2.

        0 - Use colour error
        1 - Use colour volume
        2 - Use most frequent colours

   0)will set the optimizer to select colors with the least color error from
     the original image. This is a slow proces, but will give good colors if
     the image consist of a broarder range of colors(with few shades).
   1)if an image has alot of shades this method will usualy give the best result.
   2)gives good results if an image consists of a small range if colors, will
     usually result in less use of palette attributes.

   By good result is ment that colors will almost be like the original image
   plus a reduction of the number of palette attributes.

 -SetAutoOffset

   A switch that controls if the library should automatically move the palette
   offset pointer to the end of the last loaded palette attribute. Range is 0
   or 1, 0 for OFF and 1 for ON.

 -SetScale

   A swithc that control if the image should be scaled before it is diplayed
   on the screen. When scaling is ON it will affect all import funtions aswell
   as animated gif. Range is 0 or 1, 0 for OFF and 1 for ON.

 -SetScaleSize

   A switch that controls the size, in pixels, of the image that is to be scaled.
   Range is 1 to 32767 for x or y size. 

 Hint:
   Since the new import library fully replaces the old, excluding the old
   importing library when building might be a good idea. Although there should
   be no problems in including both, it would be a waste of memory when loading
   the library into the IDE if you are not using them.


 Known problems:
   if the library fails in allocation internal buffers for image processing,
   the result is simply that the image is not shown. This usually happens in
   the IDE, but should be OK when compiled to an .exe file, unless you are
   running with very very low resources.


Ŀ
EOD                                                              06-09-2002 

