Transform a string with a filename into a list of RGB integers.

    Args:
      s: path to the file with an image.

    Returns:
      ids: list of integers

def encode(self, s):
    """Transform a string with a filename into a list of RGB integers.

    Args:
      s: path to the file with an image.

    Returns:
      ids: list of integers
    """
    try:
      import matplotlib.image as im  # pylint: disable=g-import-not-at-top
    except ImportError as e:
      tf.logging.warning(
          "Reading an image requires matplotlib to be installed: %s", e)
      raise NotImplementedError("Image reading not implemented.")
    return im.imread(s)