Copy link to clipboard
Copied
For example, my current column width is 81mm.
I want this image to scale proportionally while preserving the cropping state.
Rather than reverting to the uncropped state and then resizing to fit the column width.
Following the traditional approach:
item.fit(FitOptions.PROPORTIONALLY);
item.fit(FitOptions.FRAME_TO_CONTENT);
This appears to restore the image to its original state before scaling it to a width of 81mm.
Copy link to clipboard
Copied
Hey there,
Is it mandatory to use scripts here? While scripts are great, they’re not the most versatile option. I believe using Objects styles that match your requirements would be more flexible.
With Objects styles, you can control all the dimensions, adjust FitOptions and specific offsets, add shortcuts, create dependencies, and perform many other tasks. And all that, very quickly ^^
Copy link to clipboard
Copied
Hi@dublove ,
Use a transformation matrix after you calculated the new scaling factor…
See:
[AS/CC]Resizing a box and its contained image
Laubender, Feb 08, 2014
Kind regards,
Uwe Laubender
( Adobe Community Expert )
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now