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

Trim isn't trimming all transparent pixels

Guest
Jul 30, 2020 Jul 30, 2020

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? 

13.3K
Translate
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

...
Translate
Adobe
Community Beginner ,
Sep 18, 2023 Sep 18, 2023

Well, this one for example.

In my Photoshop it will leave a row of 16 pixels top and bottom when trimmed based on transparent pixels all sides.

Translate
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 18, 2023 Sep 18, 2023

Sloppy clipping has consequences. 

Screenshot 2023-09-18 at 09.51.34.png

Translate
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 18, 2023 Sep 18, 2023

Hmm... point taken.

But since I'm getting lots of my matrial from other sources I guess "sloppy clipping" is the norm than the odd occurance.

Fact is, I can't remember the last time the trim command actually effectively trimmed the background from anything. And working with Photoshop for more than 20 years I will swear the success rate has gone downhill.

 

The working steps is usually to go for the trim - see that it doesn't work (this is where I suspect will probably say it works as it should) - then trim the image manually while cursing at the useless trim command. Perhaps adding an option for more tolerance of invisible dust-pixels is an idea?

Translate
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 18, 2023 Sep 18, 2023
quote

And working with Photoshop for more than 20 years I will swear the success rate has gone downhill.

That is not Photoshop’s fault. 

As far as Photoshop is concerned a pixel with 1% opacity is not an »empty« pixel, if your contributors think differently they appear to be mistaken. 

 

I would recommend applying »Stroke« (set to »Position: Outside«) and checking the image at View > 100% before invoking Trim. 

 

I think it would be possible to automate a Trim to something else than completely transparent pixels with a Script, maybe even with an Action. 

Translate
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 18, 2023 Sep 18, 2023

Just to clarify: I don’t claim that I don’t occasionally miss stray pixels, too, even after using the Stroke-check. 

Translate
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 18, 2023 Sep 18, 2023
LATEST
quote

Perhaps adding an option for more tolerance of invisible dust-pixels is an idea?

By @JayBeeM

 

The idea of a threshold just occurred to me too, and you might consider posting that as a feature request in the Ideas section of this community…that’s where feature requests are formally evaluated separately from the general help questions here.

 

As for the Trim command being useless or less effective…no. It does exactly what it is asked to do. That’s why I asked if you had an example. Because as far as I know, every time this has come up, when the example was examined we have been able to show that there was a non-transparent pixel outside the intended area. The option is to trim transparent pixels, and it does exactly what it says, a pixel with even 1% opacity doesn’t get trimmed, so no bug.

 

However…the intention of the command is to make life easier, so in a world where people constantly hand you work that’s not properly cleaned up, the fact that it’s very difficult to notice a pixel with 1% or 2% opacity can screw up trimming, and this does seem like a problem that computers should help solve. Your idea of a threshold might be one approach, not sure if there are any unintended consequences from that but it’s worth asking Adobe to explore it. Or, a better algorithm or AI could help support the intention of this feature, rather than always taking it literally, which gets screwed up by stray or low opacity pixels.

 

As for me, when this happens, once the non-transparent pixels are identified I drag a rough lasso or rectangular marquee selection around the area and hit Delete to nuke anything that shouldn’t be there, then Trim again.

Translate
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 18, 2023 Sep 18, 2023

That’s a nice technique, using the Stroke effect. I think I’ll start using it instead of the Threshold technique I posted earlier in the thread.

 

Case closed...not a bug.

Translate
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