-
1. Re: Better Alpha channel handling
Noel Carboni Jun 7, 2010 4:31 PM (in response to harry teasley)Generally speaking the resize of an image on a layer in which the canvas is exactly the size of the data will result in transparency peeking in around the edge (i.e., I'm agreeing with you here, just using Photoshop terms). I've always thought this was kind of poorly thought-out too. As you say, the algorithm must default to using 0 vs., say, replicating (or "clamping") to the alpha of the pixels right on the edge.
I suppose theoretically, the thinking is that if you were to EXPAND the canvas, the area around the image would be transparent anyway, and a subsequent resampling would then have the same result as the above.
Knowing this, one way to work around the problem would be to create a slightly larger image, then Canvas Size it down to your intended resolution. That way there's layer data beyond the edges with which the resizing algorithm can work. I realize that's probably not a practical solution in general, but a trick to keep up your sleeve if you really do need that 128 x 128 image with alpha solid to the edge.
-Noel
-
2. Re: Better Alpha channel handling
harry teasley Jun 8, 2010 7:19 AM (in response to Noel Carboni)Yeah, I know about that behavior of layers during a resize - it's an important point you raise - but I would have guessed (if I had been asked to) that the alpha channel would behave like the background layer does during a resize. If you resize a white image (background layer only), you don't get sampling against off-canvas info, or at least not, say, arbitrarily black off-canvas info. Shrink a white 1024x1024 white canvas down to 64x64, and the edge pixels of the background layer remain perfectly white, even if your specified background color is not white.
I would expect the same from the alpha.
As to workarounds, yes, this can be worked around, but not very productively. It's labor-intensive and annoying.
-
3. Re: Better Alpha channel handling
Noel Carboni Jun 8, 2010 8:20 AM (in response to harry teasley)Oh, I agree with you, it would be nice...
My point is that alpha (aka a transparency plane under the covers) can only be associated with a layer (not the background) and layers behave differently than the background during resizing - that's a known thing.
I would love to see an option for how to handle layer edges (e.g., a checkbox to allow one to handle resizing the way it is now or the way the background is handled), but alas layer behavior in general cuts all across Photoshop. It might not be feasible to change behavior that has been at the basis and core of development for many generations of Photoshop.
-Noel
-
4. Re: Better Alpha channel handling
harry teasley Jun 11, 2010 12:07 PM (in response to Noel Carboni)Noel Carboni wrote:
My point is that alpha (aka a transparency plane under the covers) can only be associated with a layer (not the background) and layers behave differently than the background during resizing - that's a known thing.I believe that to be incorrect: alpha channels are not associated with layers. They are channels.


