layeredimage/io/webp.py
def openLayer_WEBP(file: str) -> LayeredImage:
	"""Open a .webp file into a layered image."""
	project = Image.open(file)
	projectSize = project.size
	layers = []
	for index in range(project.n_frames):  # type:ignore
		project.seek(index)
		layers.append(Layer(f"Frame {len(layers) + 1}", project.copy(), projectSize))
	project.close()
	return LayeredImage(layers, projectSize)
Open a .webp file into a layered image.
Open a .webp file into a layered image.
Open a . webp file into a layered image .
def openLayer_WEBP(file: str) -> LayeredImage:
	project = Image.open(file)
	projectSize = project.size
	layers = []
	for index in range(project.n_frames):  
		project.seek(index)
		layers.append(Layer(f"Frame {len(layers) + 1}", project.copy(), projectSize))
	project.close()
	return LayeredImage(layers, projectSize)
def openLayer_WEBP ( file : str ) -> LayeredImage : project = Image . open ( file ) projectSize = project . size layers = [ ] for index in range ( project . n_frames ) : project . seek ( index ) layers . append ( Layer ( f"Frame {len(layers) + 1}" , project . copy ( ) , projectSize ) ) project . close ( ) return LayeredImage ( layers , projectSize )
Open a .webp file into a layered image.
Open a . webp file into a layered image .
"""Open a .webp file into a layered image.""" # type:ignore
file
str