Skip to main content
Inspiring
August 1, 2019
Répondu

Image DPI size lower than the document DPI size

Hi,

I have something which i read it in the past 2 days.

What Photoshop do if place a image with DPI size lower in document than bigger DPI size.

And from what i read i understand that the Photoshop will change automatically the DPI of the image to mach the DPI of the document....Is this correct.....or i have to go back to the "drawing board"

Thank you for the answer

Nik

Ce sujet a été fermé aux réponses.
Meilleure réponse par D Fosse

DFosse,

you're right, thanks

and I'm amazed that JJMack's copy of CS3 [win] refers to DPI in image info metadata.

see his screenshot

I wonder when that was corrected to PPI? Its right in my Photoshop and Bridge CC

 

thanks

neil barstow, colourmanagement


https://forums.adobe.com/people/NB%2C+colourmanagement  wrote

and I'm amazed that JJMack's copy of CS3 [win] refers to DPI in image info metadata.

That's presets he has made himself. There was of course never any "DPI" in Photoshop.

Anyway.

This discussion is now at a point where every new post just adds to the OP's confusion, whatever it says. So I'm posting this with great hesitation.

Place makes a Smart Object, which lives by some special rules for the sake of compatibility with other applications. One of these rules is that physical print dimensions take precedence over pixel dimensions. This isn't a natural way for Photoshop to operate, but it can be made to work by using the ppi value.

This means that if the ppi values are different, some scaling has to happen in order to keep the print dimensions consistent relative to each other.

Life is very much simpler if you don't Place, don't make a Smart Object, but instead Copy/Paste. In that case it's all pixels and nothing but pixels. Each document (yes, document) then consists of a pixel grid. One pixel grid aligns to the other, one pixel over another. In this case, ppi has no say in the matter, it doesn't come into the equation.

8 commentaires

Legend
August 2, 2019

Actually, I'm going back to the original question. You use the word "document". Photoshop is not a tool for making documents, it's a tool for making raster images. What you describe (placing images at different resolution) confirms you may have the wrong tool. Documents are made in InDesign, Illustrator, even Word. Not in Photoshop.

Legend
August 2, 2019

Adobe's official terminology is "document."

Placing images can be confusing, but Photoshop does allow control over the process. Just not always in obvious ways.

JJMack
Community Expert
Community Expert
August 2, 2019

It is confusing because of Adobe Preferences "Resize during place" That can scale Large Smart Objects Layers to fit on canvas, It do not resize the object.  I have never seen it Documented that Place resized image files based on the Files meta data print resolution setting compared to the current document current resolution setting. It is not easy to control you need to  compare the two resolution and change the current document current resolution to match the image file print resolution, do the place then change the current document resolution to what it was. So the object will not be degraded.  That can be scripted though.

// June 2019  John J. McAssey (JJMack)

// This attempt to add an Additional Photoshop Place Embedded No Degrade feature under menu file scripts listed under Image Processor

// File>Scripts>placeImageNoDegrade... Embedded Image without a Degrading Resizing based on file print DPI setting.

// The Photoshop Preferences Resize During Place if set will scale large object to be scaled to fit on canvas

// The function placeImageNoDegrade(file) is designed for use in scripts to place in image files a default size and not lose image quality.

// This Script supports PSD, Tiff, Jpeg, PNG and Camera Raw file placement.  However, Camera RAW files have no print DPI

// for they are not printable.  This script assumes your default Camera RAW work-flow conversion is to a 300DPI resolution

// The following Image Filetype are not supported for Photoshop support is not what it should be IMO or the file poor or to large to embed

// or are not commonly used by me.: PSB SVG AI BMP GIF EPS PDF DCS DICOM  IFF Jpeg2000 PCX PDF Pixar PBM Targa   etc...

// This script is supplied as is. It is provided as freeware.

// The author accepts no liability for any problems arising from its use.

/* Help ]

<javascriptresource>

<name>$$$/JavaScripts/placeImageNoDegrade/Menu=placeImageNoDegrade...</name>

<about>JJMack's placeImageNoDegrade Copyright 2019 Mouseprints Place without degrading image quality</about>

<category>aaaThisPutsMeAtTheTopOfTheMenu</category>

<enableinfo>true</enableinfo>

</javascriptresource>

*/

if (!documents.length) alert('There are no documents open.', 'No Document');

else {

if (!CheckVersion(13)) { alert("Photoshop version CS6+ is required.")}

else {

var imageFile;

imageFile = selectFile ();

if (imageFile==null) alert("No Image Files Selected", 'Cancelled');

else if (!imageFile.name.match(/\.(crw|nef|raf|orf|mrw|dcr|mos|raw|pef|srf|dng|x3f|cr2|erf|sr2|kdc|mfw|arw|nrw|rw2|rwl|iiq|3fr|fff|srw|gpr|dxo|heic|arq|cr3|psd|jpg|jpe|jpeg|png)$/i) ) alert(imageFile.name, 'Not a Supported Image Filetype');

else placeImageNoDegrade(imageFile);

}

}

//////////////////////////////////////////////////////////////////////////////////

//                     Helper Functions             //

//////////////////////////////////////////////////////////////////////////////////

function CheckVersion(PSV) {

var numberArray = version.split(".");

if ( numberArray[0] < PSV ) { return false; }

return true;

}

function selectFile (multi) {  

if (multi == true) {var theString = "please select Image files"}  

else {var theString = "please select one image file"};  

if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog (theString, '*.crw;*.nef;*.raf;*.orf;*.mrw;*.dcr;*.mos;*.raw;*.pef;*.srf;*.dng;*.x3f;*.cr2;*.erf;*.sr2;*.kdc;*.mfw;*.arw;*.nrw;*.rw2;*.rwl;iiq;*.3fr;*.fff;*.srw;*.gpr;*.dxo;*.heic;*.arq;*.cr3;;*.psd;*.tif;*.tiff;*.jpg;*.jpe;*.jpeg;*.png', multi)}  

else {var theFiles = File.openDialog (theString, getFiles, multi)};  ////// filter files  for mac //////   

function getFiles (theFile) {  

if (theFile.name.match(/\.(crw|nef|raf|orf|mrw|dcr|mos|raw|pef|srf|dng|x3f|cr2|erf|sr2|kdc|mfw|arw|nrw|rw2|rwl|iiq|3fr|fff|srw|gpr|dxo|heic|arq|cr3|psd|tif|tiff|jpg|jpe|jpeg|png)$/i) || theFile.constructor.name == "Folder") return true;  

};  

return theFiles  

};

function placeImageNoDegrade(file) {

var orig_resolution = app.activeDocument.resolution; // Get document Resolution (Read only change via image resize)

var orig_ruler_units = app.preferences.rulerUnits; // Save Units

app.preferences.rulerUnits = Units.PIXELS; // Set the ruler units to PIXELS

// Thanks to SuperMerlin gets image Files Print resolution

if (file.name.match(/\.(crw|nef|raf|orf|mrw|dcr|mos|raw|pef|srf|dng|x3f|cr2|erf|sr2|kdc|mfw|arw|nrw|rw2|rwl|iiq|3fr|fff|srw|gpr|dxo|heic|arq|cr3)$/i))  printDPI= 300;

else {

if ( !ExternalObject.AdobeXMPScript ) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript'); 

var xmpf = new XMPFile( File(file).fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_READ ); 

var xmp = xmpf.getXMP(); 

if(xmp.doesPropertyExist(XMPConst.NS_TIFF, "XResolution")){ 

var res = xmp.getProperty(XMPConst.NS_TIFF, "XResolution"); 

res = res.toString().split("/"); 

printDPI= res[0]/res[1]

}

else printDPI= 72;

}

if(orig_resolution!=printDPI) app.activeDocument.resizeImage(null, null, printDPI, ResampleMethod.NONE);

// Place in the file

var idPlc = charIDToTypeID( "Plc " );

    var desc5 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

    desc5.putPath( idnull, new File( file ) );

    var idFTcs = charIDToTypeID( "FTcs" );

    var idQCSt = charIDToTypeID( "QCSt" );

    var idQcsa = charIDToTypeID( "Qcsa" );

    desc5.putEnumerated( idFTcs, idQCSt, idQcsa );

    var idOfst = charIDToTypeID( "Ofst" );

        var desc6 = new ActionDescriptor();

        var idHrzn = charIDToTypeID( "Hrzn" );

        var idPxl = charIDToTypeID( "#Pxl" );

        desc6.putUnitDouble( idHrzn, idPxl, 0.000000 );

        var idVrtc = charIDToTypeID( "Vrtc" );

        var idPxl = charIDToTypeID( "#Pxl" );

        desc6.putUnitDouble( idVrtc, idPxl, 0.000000 );

    var idOfst = charIDToTypeID( "Ofst" );

    desc5.putObject( idOfst, idOfst, desc6 );

executeAction( idPlc, desc5, DialogModes.NO );

if(orig_resolution!=printDPI) app.activeDocument.resizeImage(null, null, orig_resolution, ResampleMethod.NONE);

app.preferences.rulerUnits = orig_ruler_units; // Reset units to original settings

return app.activeDocument.activeLayer;

JJMack
Legend
August 1, 2019

Place files in Photoshop

Under Preferences->General you can specify whether to resize placed images.

JJMack
Community Expert
Community Expert
August 1, 2019

It a File document setting you can see and set when you create the document and you can also set it in the Image Size dialog lower print size section. The Image Size dialog top section is files size number of  pixels. The bottom section Print size. Print width Print Hieght and Print Pixels size  resolution the DPI. When constrainec chang one setting Photoshop will calulate the other two. If resampls is not check the File size will remains the same size not a single pixel will be chnged just the print settings will be changed and it will be a constrained resize.

Its in the File information meta data

JJMack
NB, colourmanagement
Community Expert
Community Expert
August 1, 2019

Hi JJMack,

I am still not understanding, I apologise.

What you are showing there is what I expected, image size is expressed in Pixels and Pixels per inch (or centimetre) for pixel density*

*[except for the file metadata dialog you show, I would suggest that use of DPI here may perhaps be an error in CS3? In Bridge CS, file resolution is shown as PPI]

In FILE/NEW I also only see Pixels/inch or Pixels/centimetre.

In IMAGE/SIZE I suggest that the user is simply instructing Photoshop how many pixels to use per inch (or centimetre) when displaying or printing the image.

I am not seeing the DPI [dots per inch] you mentioned anywhere in IMAGE/SIZE, or in FILE/NEW just in the Metadata.

In my experience Pixels Per Inch is all we get in reference to images.

Dots Per Inch refers to printed dots, as in offset.

Photoshop image size and resolution

thanks

neil barstow, colourmanagement

JJMack
Community Expert
Community Expert
August 1, 2019

Place creates by default a smart object layer.  The Pixels rendered for the layer are set in concrete and can not be be  change by Photoshop tool.   When you use Place.  Place will create  the pixels for the layers based on the image Files Print DPI compared to the current documents resolution. If the resolutions are not the same Photoshop will resize,  resample,  interpolate, degrade whatever you want to call it the image being place.  The number of pixels in the smart object will not be the number of pixels in the Image file.  A different image will be place in that has fewer of more pixels than are in the Image file canvas.

Resizing is not an option during place it is built in.  Resize during place will scale large object layers to fit on canvas.  It does not resize the object it may scales the smart layer.

For example If I open and Image from my camera that has 8MP. If I use Images size with resample NOT checked and set resolution to 300 DPI and save a jpeg. then resize to 200DPI resample not checked and save a jpeg. Then repeat that process setting the resolution to 100 DPI and save and Jpeg.  I will have three jpeg image files that all have exactly 8MP the same 8mp. If I then open a new document that  has an Aspect Ratio 2:3 that has 8MP with a resolution 72DPI.  If I Place in the three 8MP jpeg  image. None of the Smart Object layers will have 8MP and all three will have a different number of  pixels in the layer.  None of the smart object layer will contain the actual image placed in. They will all have a degraded version of the image.

The three smart Obkect layers are scaled full size 100% width an height the 8MP 300dpi image has been resized to ‭471,801‬pixels very degraded.]

An other example. I open the 8MP 300DPI jpeg in Photoshop then place the 8Mp 100DPI image in. When I did it look like Place did a fine job. Because the Photoshop Preferences resized during place scaled the Place image down is size so it would fit within the document canvas, In fact Place scaled the layer to 1/3 its actual size for Place created a layer with ‭73,668,096‬ pixels for the 8Mp 100dpi image file,

JJMack
JJMack
Community Expert
Community Expert
August 1, 2019

IMO you need the be very careful using place. For Place will degrade your image quality if the Document  Print DPI  is different that the Image files being Placed in. Photoshop will resample the image file while creating the the Object Layer content.  This is not optional and it has nothing to do the the Photoshop Preference Resize during Place.  That preference  only comes into play if the Smart Object Layer created  is larger then the Document  Canvas size.  If its is Photoshop will set the Smart Object Layers associated transform to scale the smart object layer to fit on the canvas if the preference is resize during place is checked.

Place is the only Photoshop feature the degrade image this way.  Duplicating a layer from one document into an other does not resize the layer.  Copy Paste does not resize the layer. Drag and Dropping layers between documents does not resize layers.  Only Place does.

This drove me up the wall when I first started to script Photoshop, It took me quite sone time the figure out how Place worked so I could script its use.

JJMack
NB, colourmanagement
Community Expert
Community Expert
August 1, 2019

HI

Generally the term PPI is preferred for images,'Pixels per inch'.

DPI traditionally refers to printed matter, DOTS per inch, its quite a different thing.

If you have a master file with a specific PPI, you'd be better served by first carefully resizing any image you wish to place, so that the PPI matches.

I hope this helps

if so, please do mark my reply as "helpful"

thanks

neil barstow, colourmanagement

Legend
August 1, 2019

The question has no real meaning, but we are trying to answer what you need to know.

If you save the result to a PNG etc. there can be only one image resolution. Your placed images must be resampled up or down. If you want to call this "dpi increasing" you can.

NikVetroAuteur
Inspiring
August 1, 2019

Thank you

jane-e
Community Expert
Community Expert
August 1, 2019

When you are moving one image to another in Photoshop, you are dealing strictly with pixels, not how many pixels are in an inch (ppi).

Set the ruler to pixels instead of inches if it helps you to see it better.

~ Jane

NikVetroAuteur
Inspiring
August 1, 2019

Hi,

The information i search is.

the image DPI will change or not?

Legend
August 1, 2019

Yes, the image will be upscaled. Yes, you should go back to the drawing board, because that won't make the image good enough for your design.