layeredimage/io/__init__.py
def openLayerImage(file: str) -> LayeredImage:
	"""Open a layer image file into a layer image object.

	Args:
		file (str): path/ filename

	Raises:
		FileExistsError: If the layered image does not exist
		ValueError: If the extention is not recognised

	Returns:
		LayeredImage: a layered image object
	"""
	functionMap = {
		"ora": openLayer_ORA,
		"psd": openLayer_PSD,
		"xcf": openLayer_XCF,
		"pdn": openLayer_PDN,
		"tif": openLayer_TIFF,
		"tiff": openLayer_TIFF,
		"webp": openLayer_WEBP,
		"gif": openLayer_GIF,
		"lsr": openLayer_LSR,
		"layered": openLayer_LAYERED,
		"layeredc": openLayer_LAYEREDC,
	}
	if not exists(file):
		Logger(FHFormatter()).logPrint(file + " does not exist", LogType.ERROR)
		raise FileExistsError
	fileExt = file.split(".")[-1].lower()
	if fileExt not in functionMap:
		extNotRecognised(file)
		raise ValueError
	return functionMap[fileExt](file)
Open a layer image file into a layer image object.

	Args:
		file (str): path/ filename

	Raises:
		FileExistsError: If the layered image does not exist
		ValueError: If the extention is not recognised

	Returns:
		LayeredImage: a layered image object
	
Open a layer image file into a layer image object.
Open a layer image file into a layer image object .
def openLayerImage(file: str) -> LayeredImage:
	functionMap = {
		"ora": openLayer_ORA,
		"psd": openLayer_PSD,
		"xcf": openLayer_XCF,
		"pdn": openLayer_PDN,
		"tif": openLayer_TIFF,
		"tiff": openLayer_TIFF,
		"webp": openLayer_WEBP,
		"gif": openLayer_GIF,
		"lsr": openLayer_LSR,
		"layered": openLayer_LAYERED,
		"layeredc": openLayer_LAYEREDC,
	}
	if not exists(file):
		Logger(FHFormatter()).logPrint(file + " does not exist", LogType.ERROR)
		raise FileExistsError
	fileExt = file.split(".")[-1].lower()
	if fileExt not in functionMap:
		extNotRecognised(file)
		raise ValueError
	return functionMap[fileExt](file)
def openLayerImage ( file : str ) -> LayeredImage : functionMap = { "ora" : openLayer_ORA , "psd" : openLayer_PSD , "xcf" : openLayer_XCF , "pdn" : openLayer_PDN , "tif" : openLayer_TIFF , "tiff" : openLayer_TIFF , "webp" : openLayer_WEBP , "gif" : openLayer_GIF , "lsr" : openLayer_LSR , "layered" : openLayer_LAYERED , "layeredc" : openLayer_LAYEREDC , } if not exists ( file ) : Logger ( FHFormatter ( ) ) . logPrint ( file + " does not exist" , LogType . ERROR ) raise FileExistsError fileExt = file . split ( "." ) [ - 1 ] . lower ( ) if fileExt not in functionMap : extNotRecognised ( file ) raise ValueError return functionMap [ fileExt ] ( file )
Open a layer image file into a layer image object.
Open a layer image file into a layer image object .
"""Open a layer image file into a layer image object.

	Args:
		file (str): path/ filename

	Raises:
		FileExistsError: If the layered image does not exist
		ValueError: If the extention is not recognised

	Returns:
		LayeredImage: a layered image object
	"""
a layered image object
a layered image object
LayeredImage
If the layered image does not exist
If the layered image does not exist
FileExistsError
If the extention is not recognised
If the extention is not recognised
ValueError
file
str
None