original_docstring: Open an image from disk `fn` as a PIL Image
docstring: Open an image from disk `fn` as a PIL Image
docstring_tokens: Open an image from disk ` fn ` as a PIL Image
code: def open_img(fn, gray=False, ignore_exif: bool = False) -> PIL.Image.Image:
      "Open an image from disk `fn` as a PIL Image"
      color = "L" if gray else "RGB"
  
      image = PIL.Image.open(str(fn))
  
      if not ignore_exif:
          image = PIL.ImageOps.exif_transpose(image)
      image = image.convert(color)
      return image
code_tokens: def open_img ( fn , gray = False , ignore_exif : bool = False ) -> PIL . Image . Image : color = "L" if gray else "RGB" image = PIL . Image . open ( str ( fn ) ) if not ignore_exif : image = PIL . ImageOps . exif_transpose ( image ) image = image . convert ( color ) return image
short_docstring: Open an image from disk `fn` as a PIL Image
short_docstring_tokens: Open an image from disk ` fn ` as a PIL Image
comment: "Open an image from disk `fn` as a PIL Image"