C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C*****************************
C**     LDM_SET_OVPIX       **
C*****************************
C
C
CD-Doc:
C OVERload_pixel   SUBROUTINE LDM_SET_OVPIX (IVAL, IERR, ERRSTR)
CD-end
      SUBROUTINE LDM_SET_OVPIX (IVAL, IERR, ERRSTR)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Set value of integer parameter OVERLOAD_PIXEL
C
C Author:  John W. Campbell, June 1993
C
C Arguments:
C
      INTEGER IVAL
      INTEGER IERR
      CHARACTER*(*) ERRSTR

C  IVAL      (R)   Overload pixel value >= 0  (0 = max. pixel value possible
C                  for the type of image e.g. 255 for byte, 65535 for i2)
C  IERR      (W)   Error flag =0 OK
C                             =2 Value must be >=0
C  ERRSTR    (W)   Error description string if error found
C
C====== GLOBALS:
C
      INCLUDE 'ldm_data.finc'
      EXTERNAL LDM_BDAT
C
C====== LOCALS:
C

C
C-------------------------------------------------------------------------------
C
      CALL LDM_ERR_I (IVAL, 0, 0, IERR, ERRSTR)
      IF (IERR.NE.0) RETURN
      OVPIX = IVAL
      IS_OVPIX = 1
      CH_OVPIX = CH_MASK
      RETURN
      END
