12

I'm not sure what setting or anything has caused this, but when I resize an image in Image > Image Size, the resized image gets semi-transparent 1px border! There seem no obvious settings to cause something like this.

It does'nt seem to do it 100% of the time, I notice it more when I'm cutting up a design and paste images into new documents. Here I have recreated it with a simple 2-layer image:

enter image description here

7

This is an artifact of the resampling method.

If you take a 500px square image of red (no other layers and where the red layer is NOT locked as background layer) reduce it to 100px, the transparency is there when using bicubic resampling, but does not happen when using nearest neighbor.

I tried this with noise-filled layers and it still occurs, but is a lot less noticeable.

  • It's too bad that nearest neighbor makes the image look like total garbage. – manafire Dec 12 '13 at 16:07
  • 1
    It seems to me that this is a bug in the implementation of the resampling algorithm rather than an artifact inherent to the resampling method. I could be mistaken, but if I were to write my own resize algorithm the new pixels would be sampling only from old pixels, and if none of them have any transparency, none should be introduced from the samples. I almost feel as if PS is attempting to sample from beyond the image with edge cases, and getting 0 for opacity/alpha, but that's just total speculation on my part. – TMobotron Sep 26 '14 at 23:22
  • +1 For actually giving an explanation instead of just a work-around. – Captain Hypertext Jun 25 '16 at 0:32
5

Duplicate the resized layer and merge it down. Repeat. This will remove half-transparent edges of opaque layers. I agree it's a pain in the ass though.

  • And while you do that, record it as an action for later use. You never know when you're going to need it again. :) – lorddarq Sep 26 '14 at 12:43
4

I have had this a few times, just simply add a layer at the back of the document in a single colour like black, or a colour that matches the edges of your work and should be all sorted!

3

If the photo is important, I combine two images: 1, an image downsampled using the bilinear method, and 2 (on top), the same image reduced using bicubic sharper. That gives me a better photo, with only the edge pixels from the lesser reduction method. (First downsample with the bilinear method, copy the result, then go to history and return to the full-sized image, then downsample using bicubic sharper. To finish, paste the copied first image below the second. Then flatten the image or go to File > Save for web.

And yes, sometimes the result is worth the effort.

2

The best solution I have found for this is to use the old Bilinear sampling method when I need to resize and avoid the 1 pixel semi-transparent border. You can find it under Image > Image Size > Resample: (select Bilinear). It doesn't resample quite as nicely as the Bicubic method, but I find it's good enough and it does solve the problem.

2

Be sure your images is flattened before resizing, the only layer should be the background layer !

2

Try this workaround: say you want a target resolution of 200×100, resize it to ~202×102 instead, and manually remove the semi-transparent border using the Single Row/Column Marquee Tool.

0

I Don't know why it works but I found that converting the item in question to a smart object first then doing the resize (and you can rasterize the layer after if you want) it will not convert semi transparent pixels to grey but preserve the transparency instead. Try it out!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.