Sub topic 6
Resampling: when Photoshop adds or removes pixels
This chapter assumes you know what a pixel is, can open and save files in Photoshop, and have read the earlier chapters on pixel dimensions, resolution (pixels per inch, ppi), and document size. You should be comfortable with the relationship pixels = inches x ppi.
What resampling means
Resampling is any operation that changes the total number of pixels in an image. Photoshop does one of two things:
- Downsampling removes pixels. A 3000 px wide image becomes 1500 px wide.
- Upsampling adds pixels. A 1500 px wide image becomes 3000 px wide.
The pixels Photoshop adds do not come from the real scene. Photoshop calculates their values from the pixels already in the file. That calculation is called interpolation, and the next chapter covers the available methods. The key point here is that resampling changes the data in the file. Changing the document size without resampling does not.
Resample on versus Resample off
The Resample checkbox in the Image Size dialog (Alt+Ctrl+I on Windows, Option+Cmd+I on macOS) decides which of the two relationships you are editing.
With Resample off, the pixel count is locked. Width, height, and resolution are linked, so changing one changes the others to keep the product constant. Nothing in the file's pixel data changes. You are only relabeling how large those pixels print.
With Resample on, the pixel dimensions are free to change. Photoshop adds or removes pixels to reach the values you type.
Image > Image Size (Alt+Ctrl+I on Windows, Option+Cmd+I on macOS)
Resample OFF: Width 10 in, Resolution 300 ppi -> set Resolution to 150 ppi
Result: Width becomes 20 in, pixel dimensions stay 3000 px, no pixels are changed.
Resample ON: Width 3000 px -> set Width to 1500 px
Result: Photoshop removes pixels using the chosen interpolation method.| Setting | Pixel count | Pixel data | Typical use |
|---|---|---|---|
| Resample off | Fixed | Unchanged | Relabeling print size for a printer's required ppi |
| Resample on | Changes | Rewritten | Making a file smaller for the web, or larger for a bigger output |
The three values and what each edit does
Three numbers describe the file: pixel width, print width, and resolution. Which ones move depends on what you edit and whether Resample is on.
| You change | Resample | Result |
|---|---|---|
| Resolution | Off | Print size changes. Pixels stay the same. |
| Resolution | On | Pixel dimensions change. Print size stays the same. |
| Print width | Off | Resolution changes. Pixels stay the same. |
| Print width | On | Pixel dimensions change. Resolution stays the same. |
| Pixel width | On | Print size changes if resolution is held. Pixels are added or removed. |
The second row surprises many people. If you turn Resample on and change resolution from 300 to 72 ppi while keeping the document at 10 inches wide, Photoshop reduces the image from 3000 px to 720 px. This is a common way to lose quality by accident when you only meant to change a label.
A worked example
Suppose you have a 3000 x 2000 px photo at 300 ppi, which is 10 x 6.67 in. You need two things from it.
Task 1: a 6 x 4 inch print at 300 ppi. You need 1800 x 1200 px. Turning Resample on and entering 6 in and 300 ppi makes Photoshop remove pixels. This is downsampling.
Task 2: a print the printer wants at 150 ppi. Turn Resample off and set the resolution to 150 ppi. The document becomes 20 x 13.33 in with the same 3000 x 2000 pixels. Nothing was resampled.
pixels = inches x ppi
3000 px / 300 ppi = 10 in
3000 px / 150 ppi = 20 in
6 in x 4 in at 300 ppi = 1800 x 1200 pxA check before you click OK: the dialog shows the new pixel dimensions near the top, along with the file size. If those numbers differ from the originals, you are about to resample.
Downsampling: what you lose and gain
Downsampling is generally safe for appearance. Photoshop combines neighboring pixels into fewer pixels, so the image looks like a smaller version of the same picture. The costs are these:
- Lost detail. Fine texture, small text, and thin lines may disappear or soften. This loss is permanent once you save over the original.
- Changed sharpness. Averaging pixels softens edges. Many people apply a light sharpening step after downsizing.
- Smaller files. Fewer pixels means a smaller file and faster loading, which is why downsampling is the standard step before publishing to the web.
Keep an untouched copy of the original. You cannot recover discarded pixels from the downsampled file.
Upsampling: what you gain and what you do not
Upsampling makes a file bigger, but it cannot recover detail that was never captured. Photoshop estimates new pixel values from their neighbors. The result has more pixels without more real information, so large enlargements look soft, blocky, or smeared.
Consider a 1000 px wide image enlarged to 4000 px. The file now has sixteen times as many pixels in total, but only one in sixteen came from the camera or the original artwork. The other fifteen are estimates.
Upsampling is acceptable when:
- The enlargement is modest, such as 110 to 150 percent.
- The image will be viewed from a distance, as with a poster.
- The content is soft by nature, such as a blurred background.
It works poorly for small text, logos with hard edges, and any image already low in detail. For those, rebuild the artwork as vector shapes or reshoot or rescan at a higher resolution.
Resampling is cumulative
Each resample works from the pixels as they exist now, not from the original file. Shrinking an image and then enlarging it back to its original dimensions does not restore the detail. The shrink threw the detail away, and the enlargement invents new pixels from the blurred result.
Repeated resampling also compounds softness. Scaling an image to 80 percent, then to 90 percent, then to 70 percent is worse than going directly to the final size from the original.
Practical rules that follow from this:
- Always resize from the highest-quality source you have.
- Perform one resample per output, not a chain of small adjustments.
- Keep the original, and save each output size as a separate file.
- Where you must scale repeatedly in a layout, use a Smart Object so the original pixels are retained. A later chapter covers this.
Layer scaling is resampling too
Resampling does not only happen in the Image Size dialog. Free Transform (Ctrl+T on Windows, Cmd+T on macOS) resamples a pixel layer whenever you scale it. If you shrink a regular layer to 50 percent and commit, the discarded pixels are gone. Scaling it back up to 100 percent will not bring them back.
The same applies to rotating a pixel layer by an angle that is not a multiple of 90 degrees, since the rotated grid does not line up with the original one. Photoshop must estimate new values.
Scaling a layer converted to a Smart Object avoids this, because Photoshop keeps the source pixels and recalculates the display from them each time.
Common errors
- Leaving Resample on when you only meant to change print size. Symptom: the pixel dimensions or file size change. Fix: undo, turn Resample off, and re-enter the value.
- Leaving Resample off when you meant to shrink the file. Symptom: you type a smaller width in pixels, but the other fields change and the file size stays the same. Fix: turn Resample on first.
- Enlarging a small web image for print. A 600 px wide image enlarged to 8 in at 300 ppi needs 2400 px. Three quarters of those pixels would be invented. Source a larger original.
- Chaining several small resizes. Go from the original to the final size in one step.
- Overwriting the original. Use Save As, or export a copy, so the full-size file remains available.
Resizing with a script
Scripts make the same choice explicit. In ExtendScript, Document.resizeImage always resamples, because you give it new pixel dimensions and a resample method. Changing print size without resampling is done by passing the same pixel dimensions with a different resolution, which depends on your Photoshop version, so verify that behavior before relying on it in a batch.
// Photoshop ExtendScript (.jsx)
app.preferences.rulerUnits = Units.PIXELS;
var doc = app.activeDocument;
// Resample the image to 1200 px wide, keep proportions, 72 ppi.
var newHeight = Math.round(doc.height.value * 1200 / doc.width.value);
doc.resizeImage(UnitValue(1200, "px"), UnitValue(newHeight, "px"), 72, ResampleMethod.BICUBICSHARPER);
// Extend the canvas by 100 px on each side, keeping the artwork centered.
doc.resizeCanvas(UnitValue(doc.width.value + 200, "px"), UnitValue(doc.height.value + 200, "px"), AnchorPosition.MIDDLECENTER);The ResampleMethod.BICUBICSHARPER argument is the interpolation method. The next chapter explains how to pick one.
Summary of decision rules
- To change print size only, turn Resample off.
- To change pixel dimensions, turn Resample on.
- Prefer downsampling over upsampling. Downsampling discards detail you can live without, while upsampling guesses.
- Resample once, from the original, and keep that original.
Exercise
A photo is 4500 x 3000 px at 300 ppi. A print shop asks for the file at 200 ppi at the same physical size as it has now (15 x 10 in). With Resample on, what pixel dimensions will you get, and is this a downsample or an upsample? What would you do instead if the shop only needs the file to be labeled at 200 ppi and you want to keep every pixel?
Show answer
Keeping 15 x 10 in at 200 ppi gives 15 x 200 = 3000 px wide and 10 x 200 = 2000 px high, so 3000 x 2000 px. That is a downsample, because pixels are removed. To keep every pixel, turn Resample off and set the resolution to 200 ppi. The pixel dimensions stay 4500 x 3000 px and the print size becomes 22.5 x 15 in.
Exercise
You shrink a regular pixel layer to 25 percent with Free Transform, commit the change, and later scale it back to 100 percent. Why is it blurrier than the original, and what would you have done to avoid this?
Show answer
Shrinking to 25 percent removed most of the layer's pixels. Scaling back up added estimated pixels based on the reduced version, so the lost detail was not restored. Converting the layer to a Smart Object before scaling would have kept the original pixels, so the scaled-up result would be recalculated from the full-detail source.