code: def __EncodedAttribute_decode_gray8(self, da, extract_as=ExtractAs.Numpy):
      
      if hasattr(da, 'value'):
          raise TypeError("DeviceAttribute argument must have been obtained from "
                          "a call which doesn't extract the contents")
      if extract_as not in _allowed_extract:
          raise TypeError("extract_as must be one of Numpy, String, Tuple, List")
      return self._decode_gray8(da, extract_as)
docs: Decode a 8 bits grayscale image (JPEG_GRAY8 or GRAY8) and returns a 8 bits gray scale image.
  
          :param da: :class:`DeviceAttribute` that contains the image
          :type da: :class:`DeviceAttribute`
          :param extract_as: defaults to ExtractAs.Numpy
          :type extract_as: ExtractAs
          :return: the decoded data
  
          - In case String string is choosen as extract method, a tuple is returned:
              width<int>, height<int>, buffer<str>
          - In case Numpy is choosen as extract method, a :class:`numpy.ndarray` is
            returned with ndim=2, shape=(height, width) and dtype=numpy.uint8.
          - In case Tuple or List are choosen, a tuple<tuple<int>> or list<list<int>>
            is returned.
  
         .. warning::
             The PyTango calls that return a :class:`DeviceAttribute`
             (like :meth:`DeviceProxy.read_attribute` or :meth:`DeviceProxy.command_inout`)
             automatically extract the contents by default. This method requires
             that the given :class:`DeviceAttribute` is obtained from a
             call which **DOESN'T** extract the contents. Example::
  
                 dev = tango.DeviceProxy("a/b/c")
                 da = dev.read_attribute("my_attr", extract_as=tango.ExtractAs.Nothing)
                 enc = tango.EncodedAttribute()
                 data = enc.decode_gray8(da)