PathResource Class

Summary: Represents Photoshop Path Resource.

Module: aspose.imaging.fileformats.tiff.pathresources

Full Name: aspose.imaging.fileformats.tiff.pathresources.PathResource

Constructors

NameDescription
PathResource()Initializes a new instance of the PathResource class

Properties

NameTypeAccessDescription
block_idshortr/wGets or sets the block identifier.
namestringr/wGets or sets the name.
recordslist[aspose.imaging.fileformats.core.vectorpaths.VectorPathRecord]r/wGets or sets the records.

Constructor: PathResource()

 PathResource() 

Initializes a new instance of the PathResource class

Examples

Transfer Clipping Paths during export from TIFF to PSD image.


from aspose.imaging import Image
from aspose.imaging.imageoptions import PsdOptions

with Image.load("Sample.tif") as image:
	image.save("SampleWithPaths.psd", PsdOptions())

Create Graphics Path from Path Resources in TIFF image.


import aspose.pycore as aspycore
from aspose.imaging import Image, Graphics, Color, Pen
from aspose.imaging.fileformats.tiff import TiffImage
from aspose.imaging.fileformats.tiff.pathresources import PathResourceConverter

with aspycore.as_of(Image.load("Bottle.tif"), TiffImage) as image:
	# Create the GraphicsPath using PathResources from TIFF image
	active_frame = image.active_frame
	graphics_path = PathResourceConverter.to_graphics_path(active_frame.path_resource, active_frame.size)
	graphics = Graphics(image)
	# Draw red line and save the image
	graphics.draw_path(Pen(Color.red, 10), graphics_path)
	image.save("BottleWithRedBorder.tif")