Script can do auto fit clipping mask

Explorer ,
Oct 04, 2020

Copy link to clipboard

Copied

Hello everyone,

i need a script can fit what i make clipping mask fit to whole layer or shape. like the attachment.

TOPICS
Actions and scripting

Views

84

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
JJMack LATEST
Most Valuable Participant ,
Oct 04, 2020

Copy link to clipboard

Copied

There is no generals solution for what you want to do. A clipping mask layer layer's bounds can have aspect ratio and the pixel content within the layers bounds can be any shape.   Only layer that have identical Aspect ratio and pixel content shape can bet size to fit perfectly. Raster shapes do  not scale perfectly either rectangle may.  All other you need to design some  resizing method  to produce some results you can live with.

 

In my Collage scripts I do not  use layer to clip images to.  Instead my templates contain Alpha channels that map the collages Image locations, sizes  and shapes. So in effect my Alpha channels are like clipping layers.   My collage scripts place in images  and changes the Smart object layers Place Transform to fill the bounds of an alpha channel and aligns the smart object to the center of the alpha channels bounds then uses the Alpha channel to mask the smart objects to shape.

JJMack

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more