PSDTools

Description

Represents a layer in a Photoshop document.
Learn more: Deliver selected layers of a PSD image

Examples

			// See examples under each method
Details

Classes


new ClipAction()


new GetLayerAction()


new SmartObjectAction()

Methods


<static> clip() → {Actions.PSDTools.ClipAction}

action

Description

Trims the pixels of a PSD image according to a Photoshop clipping path that is stored in the image's metadata.

Examples

			import {Cloudinary} from '@cloudinary/url-gen';
			import {clip} from '@cloudinary/url-gen/actions/psdTools';
			
			const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});
			const image = yourCldInstance.image('woman');
			
			image.psdTools(
			 clip()
			   .byName('foo') // either name, or number
			   .byNumber(2)   // either name, or number
			   .evenOdd()     // Use the evenodd clipping rule
			);
Details

<static> getLayer() → {Actions.PSDTools.GetLayerAction}

action

Description

Delivers an image containing only specified layers of a Photoshop image.

Learn more: Deliver selected layers of a PSD image

Examples

			import {Cloudinary} from '@cloudinary/url-gen';
			import {getLayer} from '@cloudinary/url-gen/actions/psdTools';
			
			const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});
			const image = yourCldInstance.image('woman');
			
			image.psdTools(
			 getLayer()
			   .byName('foo') // One of the three
			   .byIndex(2)    // One of the three
			   .byRange(1, 3) // One of the three
			);
Details

<static> smartObject() → {Actions.PSDTools.SmartObjectAction}

action

Description

Extracts the original content of an embedded object of a Photoshop image.

Examples

			import {Cloudinary} from '@cloudinary/url-gen';
			import {smartObject} from '@cloudinary/url-gen/actions/psdTools';
			
			const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});
			const image = yourCldInstance.image('woman');
			
			image.psdTools(
			 smartObject()
			   .byLayerName('foo') // either name, or number
			   .byIndex(2)         // either name, or number
			);
Details