openImage

lib.openImage.check_libtiff(compression)
lib.openImage.get_info_libtiff(filename)

Get tiff info of a file with tiffinfo, which needs to be installed on your system.

Parameter:filename (string) – name of tiff image file
Returns:info about the file
Return type:dict
lib.openImage.open(uri)
lib.openImage.open_dcraw(filename)
Open a camera raw image file.
lib.openImage.open_image_exif(uri)
lib.openImage.open_image_exif_thumb(uri)
lib.openImage.open_image_with_command(filename, command, app, extension='png', temp_ext=None)

Open with an external command (such as Inkscape, dcraw, imagemagick).

Parameters:
  • filename (string) – filename, from which a temporary filename will be derived
  • command (string) – conversion command with optional temp file interpolation
  • extension (string) – file type
  • temp_ext (string) – if a temp file can not be specified to the command (eg dcraw), give the file extension of the command output
lib.openImage.open_image_with_pil(uri)
lib.openImage.open_image_without_pil(filename, method_register)
Try to open images which PIL can’t handle.
lib.openImage.open_imagemagick(filename)
Open an image with Imagemagick.
lib.openImage.open_inkscape(filename)
Open an Inkscape file.
lib.openImage.open_libtiff(filename)

Opens a tiff file with tiffcp, which needs to be installed on your system.

Parameter:filename (string) – name of tiff image file
Returns:PIL image
Return type:Image.Image
lib.openImage.open_thumb(filename, image=None, open_image=<function open_image_exif_thumb at 0x271f050>, size=(128, 128), save_cache=True)
lib.openImage.open_xcf(filename)
Open a gimp file.
lib.openImage.save_libtiff(image, filename, compression=None, **options)

Saves a tiff compressed file with tiffcp.

Parameters:
  • image (Image.Image) – PIL image
  • filename (string) – name of tiff image file
  • compression (string) – g3, g4, jpeg, lzw, tiff_lzw
Returns:

log message

Return type:

string

lib.openImage.verify_dcraw(filename)
Verify a camera raw image file.
lib.openImage.verify_image(info_file, valid, invalid, method_register=<lib.system.MethodRegister instance at 0x2724cf8>)
lib.openImage.verify_image_with_pil(info_file, valid, invalid)
lib.openImage.verify_image_without_pil(info_file, method_register, valid, invalid)
Try to verify images which PIL can’t handle.
lib.openImage.verify_imagemagick(filename)
Verify an image with Imagemagick.
lib.openImage.verify_xcf(filename)
Verify a gimp file.

Previous topic

odict

Next topic

pyWx