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

Trim isn't trimming all transparent pixels

New Here ,
Jul 30, 2020 Jul 30, 2020

Copy link to clipboard

Copied

I have a .png which has some transparent pixels to the right. If I go to trim and select transparent pixels, it doens't work. If I select the image (leaving the transparent pixels) and go to "crop", then it doesn't crop to the image and leaves the transparent pixels. What am I doing wrong? 

Views

8.1K

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

correct answers 1 Correct answer

Community Expert , Jul 10, 2023 Jul 10, 2023

I also looked at the posted image, and I agree: Sampling with the Eyedropper tool is flawed because it measures only the value where the pointer is, or a small area around the pointer. But if the non-white pixels are widely spaced, it’s too easy for the Eyedropper tool or color sampler to miss them.

 

When troubleshooting the Trim command, another useful method is to use a temporary Threshold adjustment layer, and drag the slider across the entire tonal range while looking at the image edges. Se

...

Votes

Translate

Translate
Adobe
Community Expert ,
Jul 30, 2020 Jul 30, 2020

Copy link to clipboard

Copied

Are you sure the area is fully empty that there are no low opacity in there. Add a bottom layer Black then white  if any pixel show.

 

 

This looks like it should Trim but should not because  I put a 1% opacity gray pixels in layer 1 canvas top left and  bottom right corners.

Capture.jpg

JJMack

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
New Here ,
Jul 30, 2020 Jul 30, 2020

Copy link to clipboard

Copied

@JJMack - thanks for your suggestion. I put a black and a white background behind the image, but I don't see any pixels. The image otherwise only has 1 layer. I can't crop to selection either.

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 ,
Jul 30, 2020 Jul 30, 2020

Copy link to clipboard

Copied

If you can not crop try resetting all tools and if you still can not crop reset your Preferences.

JJMack

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 ,
Jul 31, 2020 Jul 31, 2020

Copy link to clipboard

Copied

Hi, if you can't crop to the slection, there must be a nother problem than a stray pixel.

Did you restart, and reset the crop tool (right click on the tool icon in the toolbar)

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 ,
Jul 31, 2020 Jul 31, 2020

Copy link to clipboard

Copied

Can you post screenshot please with Layers panel and problem on canvas visible?

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 ,
Jul 31, 2020 Jul 31, 2020

Copy link to clipboard

Copied

It would be better if the could post the psd or PNG.  However they state they also can not crop it.  They have some kind of issue with Photoshop or that document. What prevents you from cropping a Document.

JJMack

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
New Here ,
Apr 08, 2021 Apr 08, 2021

Copy link to clipboard

Copied

The trim command hasn't been working for me for a while either. Seems like a bug.

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 Beginner ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

I also tried to Trim as well today and it's not working.  I did as suggested and add a black background and a white background and nothing seems to be out of line.

It seems that every time I try to work with Photoshop some element is always not working and I need to stop and Google the issue.  
This program has so much power, but it obviously has broken elements that need to be fixed.

 

Thanks.

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
New Here ,
Aug 22, 2021 Aug 22, 2021

Copy link to clipboard

Copied

I encountered this issue too and this is what I was doing wrong.

 

I was using the marquee rectangle to select a part of a square image, I then cleared the selection so I had transparent pixels, then went to trim them and nothing happened.

 

Turns out I had FEATHER set to 1px on the marquee selection, so there was an fuzzy edge to the clear, meaning the trim wouldn't work.

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 Beginner ,
Jan 11, 2023 Jan 11, 2023

Copy link to clipboard

Copied

I encountered this issue while trimming a few .png files today, though I was able to crop. I had already done a pixel search to see if there were any stray effects but did not find any, then tried the other steps suggested in this thread which did not work for me. What I ended up doing is using paint bucket to put a background color around the image (in this case, white), increased the canvas size (didn't matter how much, just increased all 4 sides), then used the magic wand to erase the white background. After clearing all of the white background, I used magic wand to select the entire area I wanted transparent to verify there were no strays and hit delete for good measure. After that I was able to trim normally.

I don't know if it will work for anyone else but it seemed to take care of the issue for me.

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 ,
Jul 09, 2023 Jul 09, 2023

Copy link to clipboard

Copied

I've been experiencing this issue as well for probably the past year. I have worked on a newsletter for over 20 years that has a classified section. When posting the classified section online, I would screen captire the images from the pdf newsetter which were in a blue 1 pt frame on a white background. Then I would simply hit Image>Trim>Top Left Pixel Color to remove the white from the page and I would have neat jpgs in their blue frames without the white background from the original page. Now I have to manually trim or crop since the discussed feature no longer works for me. Anyone figure this out yet?

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 ,
Jul 09, 2023 Jul 09, 2023

Copy link to clipboard

Copied

Please provide at least one of the images that doesn’t produce the expected result. 

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 ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

image.png

Screen capture attached. Photo group was captured from a pdf with a white background (sampled to make sure) C0 M0 Y0 K0. Photoshop will not trim the image to the top right or bottom left pixels. Original document created with InDesign.

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 ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

The image is dirty. 

I added a Curves Layer to make the non-white pixels more prominent. 

Screenshot 2023-07-10 at 15.03.19.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 ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

Thanks for the input but the white in image that I am working with have been sampled and are clean, see attached.Screen-Shot-2023-07-10-at-10.02.04-AM.jpg

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 ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

quote

Thanks for the input but the white in image that I am working with have been sampled and are clean, see attached.

I have checked the image you provided and your claim is demonstrably false. 

 

Your faulty reading seems to be caused by you setting the Eyedroper Tool to a Sample Size of 3x3. 

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 ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

You are correct, increased my sample size and received a different sample, thank you.

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 ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

»Point Sample« should provide the most accurate results for individual pixels (at the corresponding magnification). 

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 ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

I also looked at the posted image, and I agree: Sampling with the Eyedropper tool is flawed because it measures only the value where the pointer is, or a small area around the pointer. But if the non-white pixels are widely spaced, it’s too easy for the Eyedropper tool or color sampler to miss them.

 

When troubleshooting the Trim command, another useful method is to use a temporary Threshold adjustment layer, and drag the slider across the entire tonal range while looking at the image edges. Setting the Threshold Level to level 255 clearly reveals all non-white pixels as solid black, no matter how small or widely spaced they are. For this image, we can now see that there are non-white pixels right up at the current edges of the image, so Trim would decide to not bring them in at all.

 

Photoshop mariajean Trim diagnose Threshold.gif

 

When one of those pixels is inspected with the Eyedropper tool, the problem is revealed: Some pixels are just one level away from white, in only one channel: RGB(254,255,255). It is the smallest possible difference from white, but that is all it takes for Trim to say “nope.”

 

Photoshop-mariajean-Trim-diagnose-Threshold-Info.jpg

 

So the problem is, again, in the image…not a bug in Photoshop.

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 ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

Thanks so much for this beautifully explained and illustrated response, it was super helpful to me. I just used this method to investigate why the process I used for my project has changed for me. A while back Adobe moved the "Take a Snapshot" in Acrobat to an area that I can never find so I lazily began replacing it with Mac Command/Shift /4 to create the screen shots. Just did a test using your described method. The white in Acrobat's "Take a Snapshot" is clean and trims using the trim command. The Mac Command/Shift /4 is not. The moral of this story is not to be lazy! Problem solved and hope this helps someone else. Thanks all.

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 ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

Is there any »dirt« or noise in the area that appears to be white? 

Why do you use screen captures instead of processing the pdf itself? 

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 ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

See above response. Use the screen capures to post the ads to a forum.

http://www.livc.net/ubbthreads/ubbthreads.php?ubb=showflat&Number=35816 

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 Beginner ,
Sep 17, 2023 Sep 17, 2023

Copy link to clipboard

Copied

The trim command is broken. Simple as that. People will tell you it's because some pixels are left with different colors, but the truth is that the trim command has been a wreck for years.

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 ,
Sep 17, 2023 Sep 17, 2023

Copy link to clipboard

Copied

Can you post an example image where the Trim command is definitely broken?

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