@DATABASE Picture V1.00
$VER: Picture V1.00 (21.11.1998) by Laboureur -> AlphaSOUND <- Frédéric
@NODE MAIN "Picture V1.00"

    @{b}Picture V1.00 General Information:@{ub}

  * Blitz Basic II library number         : #183
  * Library size when linked to executable: 1004 bytes
  * Number of commands                    : 8
  * Resources automatically freed at end  : Yes

  NInitPicture() must be put before any other Picture functions
  or you will enjoy BIG crashes.

    @{b}Commands summary:@{ub}

  @{" NFreePicture     " LINK NFreePicture} Statement
  @{" NInitPicture     " LINK NInitPicture} Command (Boolean)
  @{" NLoadPicture     " LINK NLoadPicture} Command (PictureID)
  @{" NPictureDepth    " LINK NPictureDepth} Function (Byte)
  @{" NPictureHeight   " LINK NPictureHeight} Function (Word)
  @{" NPictureID       " LINK NPictureID} Function (Long)
  @{" NPictureToBitMap " LINK NPictureToBitMap} Function (Long)
  @{" NPictureWidth    " LINK NPictureWidth} Function (Word)
  @{" NUsePicture      " LINK NUsePicture} Statement

@ENDNODE


@NODE NFreePicture

    @{b}SYNTAX@{ub}
  NClosePicture(#Picture)

    @{b}STATEMENT@{ub}
  Remove the given Picture from memory.

@ENDNODE


@NODE NInitPicture

    @{b}SYNTAX@{ub}
  result.l = NInitPicture(#NumPictureMax)

    @{b}FUNCTION@{ub}
  Init all the Picture environments for  later  use.  You  must  put  this
  function at the top of your  source code if you want to use the NPicture
  commands. 

  #NumPictureMax : Maximum number of Pictures to handle.

@ENDNODE


@NODE NLoadPicture

    @{b}SYNTAX@{ub}
  PictureID.l = NLoadPicture(#Picture, FileName$)

    @{b}FUNCTION@{ub}
  NLoadPicture will try to load an IFF/ILBM picture into
  memory. It will be loaded in ANY memory, ie FAST ram
  if available. The picture will be kept in compressed form
  (if this is a compressed IFF/ILBM file, but normally, it
  is) so no memory is wasted.

    The result can take 3 special values:

      If PictureID = -1: File is not found
      If PictureID = -2: File is not an IFF/ILBM picture
      If PictureID = -3: Not enough free memory to load the picture

      If PictureID >= 0: All is good.
@ENDNODE


@NODE NUsePicture

    @{b}SYNTAX@{ub}
  NUsePicture(#Picture)

    @{b}STATEMENT@{ub}
  Change the used Picture to given #Picture.

@ENDNODE


@NODE NPictureToBitMap

    @{b}SYNTAX@{ub}
  Result = NPictureToBitMap(#Picture, BitMapID)

    @{b}COMMAND@{ub}
  Copy the given IFF/IBLM picture data on the given bitmap. Note, this
  function is very optimized. It supports compressed and uncompressed
  IFF pictures.

    The result can take 2 specials values:

      If Result = -1: BitmapHeader or Body chunk aren't found (ie: IFF
                      palette only)
      If Result = -2: Picture size is too big for the bitmap.

@ENDNODE


@NODE NPictureWidth

    @{b}SYNTAX@{ub}
  Width.w = NPictureWidth

    @{b}FUNCTION@{ub}
  Returns the current picture width.

@ENDNODE


@NODE NPictureHeight

    @{b}SYNTAX@{ub}
  Height.w = NPictureHeight

    @{b}FUNCTION@{ub}
  Returns the current picture Height.

@ENDNODE


@NODE NPictureDepth

    @{b}SYNTAX@{ub}
  Depth.b = NPictureDepth

    @{b}FUNCTION@{ub}
  Returns the current picture depth.

@ENDNODE


@NODE NPictureID

    @{b}SYNTAX@{ub}
  *PictureAddr = NPictureID

    @{b}FUNCTION@{ub}
  Returns the current picture memory location.It points to the start
  of the IFF file ('FORM' chunk).

@ENDNODE
