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

PPI Mismatch Between Replacement Image and Smart Object Results in Noticeable Shrinkage

Explorer ,
Dec 18, 2024 Dec 18, 2024

Copy link to clipboard

Copied

 The image used for replacement has a PPI different from the PPI of the smart object content, causing it to shrink noticeably after replacement. 

    Can you explain the relationship between the smart object layer and its content, and the underlying principles? I have a solution to convert the image's PPI to match the PPI of the smart object content. Is this feasible?

 

psd ,ppi=300

1734574873606.png

smart object content  ppi=72

1734574981464.png

  Replacement Image 1  ppi=72

1734574905864.png\

Replacement Image 2 ppi=300

1734574929781.png

Right-click and select "Replace Contents," then use a replacement image with PPI=72. The replacement works as expected.

li27112570w0z3_0-1734575496775.png

Right-click and select "Replace Contents," then use a replacement image with PPI=300. The replacement results in noticeable shrinkage.

e32d7547b2dc530d53474aed284b9b4b.png

TOPICS
Actions and scripting , Windows

Views

149

Translate

Translate

Report

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
Adobe
Community Expert ,
Dec 18, 2024 Dec 18, 2024

Copy link to clipboard

Copied

If a replacement image has a different PPI, Photoshop will silently match the PPI to the parent document in the background without any notification. Matching PPI can cause (and actually always does) the imported image to change its dimensions because this silent adjustment alters the resolution with Resample turned on.

 

For example:

The parent document is 3000x2000px at a resolution of 72.

The replacement image is 3000x2000px at a resolution of 300.

 

The imported image will be 720x480px because Photoshop silently changed the resolution from 300 to 72 in the background to match the parent document resolution (with Resample in the Image Size on).

 

There are a few solutions:

  • Adjust the image PPI before importing.
  • Adjust the image PPI after importing by editing the Smart Object layer. Go to Image > Image Size, disable Resample, then match the parent document's resolution and save the document.

 

Votes

Translate

Translate

Report

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
Explorer ,
Dec 18, 2024 Dec 18, 2024

Copy link to clipboard

Copied

What does "The parent document" refer to? Is it the outermost PSD file, or the document opened after editing the content of the smart object layer?   Which one are you referring to in my question screenshot? Is it the "psd, PPI=300" or the "smart object content, PPI=72"?

Votes

Translate

Translate

Report

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 ,
Dec 18, 2024 Dec 18, 2024

Copy link to clipboard

Copied

Parent is an open document containing the image that needs to be replaced.

The explanation above, under "For example" pertains to the situation depicted in the screenshot below.

Bojanivkovi_0-1734594320918.png

 

Votes

Translate

Translate

Report

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
Explorer ,
Dec 19, 2024 Dec 19, 2024

Copy link to clipboard

Copied

I am using a script to replace the content of a smart object layer, so I need to confirm: should the PPI of the replacement image match the PPI of the PSD or the PPI of the smart object layer's content?

Votes

Translate

Translate

Report

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 ,
Dec 19, 2024 Dec 19, 2024

Copy link to clipboard

Copied

Match the dimensions and resolution of the smart object content in this case. I assume you have pre-made replacement content that matches the dimensions but does not match the resolution of the image within the smart object layer.

 

You can also batch change the resolution to align with the template resolution, then recreate the smart object.

Votes

Translate

Translate

Report

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
Explorer ,
Dec 19, 2024 Dec 19, 2024

Copy link to clipboard

Copied

Thank you very much for your patient explanation.

Votes

Translate

Translate

Report

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
Explorer ,
Dec 19, 2024 Dec 19, 2024

Copy link to clipboard

Copied

LATEST

The current logic for obtaining the PPI of a smart object layer's content is: 1. Edit the content, 2. Retrieve the PPI. This requires the smart object content to be opened within Photoshop. If it cannot be opened, such as in the case of an .ai file, how can the PPI be obtained in such scenarios?

Votes

Translate

Translate

Report

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 ,
Dec 19, 2024 Dec 19, 2024

Copy link to clipboard

Copied

quote

I am using a script to replace the content of a smart object layer


By @li27112570w0z3


The script could have an extra conditional check added to change the PPI value of the replacement image to match the original smart object..

Votes

Translate

Translate

Report

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 ,
Dec 19, 2024 Dec 19, 2024

Copy link to clipboard

Copied

@li27112570w0z3 

 

The basic rule is that smart objects honor the physical print size, not the pixel size.

 

The print size is determined by the ppi value. That's why ppi numbers need to match throughout if sizes are to be consistent. If either the parent document or any of the embedded child documents have different ppi numbers, there will be resampling to get sizes to fit accordingly.

 

In short, smart objects make pixel images behave the same way as PDF or vector files.

Votes

Translate

Translate

Report

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