C----------------------------------------------------------------------
        subroutine fttbit(bitpix,status)

C       test that bitpix has a legal value

        integer bitpix,status

        if (status .gt. 0)return

        if (bitpix .ne. 8 .and. bitpix .ne. 16 .and. bitpix .ne. 32
     &      .and. bitpix .ne. -32 .and. bitpix .ne. -64)then
                status=211
        end if
        end
