layeredimage/io/lsr.py
def openLayer_LSR(file: str) -> LayeredImage:
	"""Open a .lsr file into a layered image."""
	import pylsr

	project = pylsr.read(file)
	groups = []
	for group in project.layers:
		groups.append(
			Group(
				group.name,
				[
					Layer(layer.name, layer.scaledImage(), layer.scaledImage().size)
					for layer in group.images
				],
				group.size,
				(int(group.offsets()[0]), int(group.offsets()[1])),
			)
		)
	return LayeredImage(groups, project.size)
Open a .lsr file into a layered image.
Open a .lsr file into a layered image.
Open a . lsr file into a layered image .
def openLayer_LSR(file: str) -> LayeredImage:
	import pylsr
	project = pylsr.read(file)
	groups = []
	for group in project.layers:
		groups.append(
			Group(
				group.name,
				[
					Layer(layer.name, layer.scaledImage(), layer.scaledImage().size)
					for layer in group.images
				],
				group.size,
				(int(group.offsets()[0]), int(group.offsets()[1])),
			)
		)
	return LayeredImage(groups, project.size)
def openLayer_LSR ( file : str ) -> LayeredImage : import pylsr project = pylsr . read ( file ) groups = [ ] for group in project . layers : groups . append ( Group ( group . name , [ Layer ( layer . name , layer . scaledImage ( ) , layer . scaledImage ( ) . size ) for layer in group . images ] , group . size , ( int ( group . offsets ( ) [ 0 ] ) , int ( group . offsets ( ) [ 1 ] ) ) , ) ) return LayeredImage ( groups , project . size )
Open a .lsr file into a layered image.
Open a . lsr file into a layered image .
"""Open a .lsr file into a layered image."""
file
str