Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

With script,How can I maintain the current "cropping state" while scaling an image proportionally?

Guide ,
Sep 22, 2025 Sep 22, 2025

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.

 

009.png

TOPICS
How to , Scripting
84
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 22, 2025 Sep 22, 2025

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 ^^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 22, 2025 Sep 22, 2025

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

https://community.adobe.com/t5/indesign-discussions/as-cc-resizing-a-box-and-its-contained-image/m-p...

 

Kind regards,
Uwe Laubender
( Adobe Community Expert )

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 22, 2025 Sep 22, 2025
LATEST

Hi Laubender

Thanks.

It's a bit complicated—I'll save it for later study.

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