1-pixel Error In Cutting Selected Rectilinear Area

DP
Posted By
Daryl_Pritchard
Feb 15, 2007
Views
511
Replies
2
Status
Closed
Hello all,

In exploring questions here about promoting slices to layers, I’ve come across a question I know has been discussed in the past yet I can’t determine what best to search for, if I’m to find an answer among the posts. So, posing the question in the context of how I’ve observed it, can anyone offer an explanation of why a transformed rectilinear selection of an image would not select the pixels under the selection marquee at 100% opacity, when the same exact area manually selected with the Rectangular Marquee tool does?

Illustrating this, I’ve taken a 120×120 pixel black square and will divide it into 30×30 pixel tiles, each tile on its own layer. Manually, I use the Rectangular Marquee tool to select an area and then do a Layer By Cut, repeating on the original layer until all tile layers are built. Deleting the background layer (not required), what I see is what I expect to see…what appears still to be a solid, uniform block of color, but built of layered tiles. Zooming in to 1600%, still I see only solid color.

Now, to automate this process as an action where a manual selection cannot be done, the approach I take is to Select All, then Transform Selection down to the top left X, Y origin I need and the fixed height and width dimensions to exactly the same area I would have defined manually. I Layer By Cut, reselect the background, and repeat for each new tile origin until all tile layers have been created. HOWEVER, immediately I observe that each rectilinear area defined by the Transform Selection is not yielding the same exact, opaque cut of data to the new layer. Instead, it seems that the outer 1-pixel perimeter of that selection is not treated as a 100% opaque cut (not sure how best to describe that). The end result is thus not a large block of color but rather a grid of tiles with a 2-pixel separation between them that is more obvious after I’ve deleted the now empty background layer and zoomed in.

Here is a flash movie of the same: <http://ambress.com/photoshop/marquee_error>

Why does this occur, and how can it be avoided in an automated process like this?

Thanks,

Daryl

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

P
Phosphor
Feb 15, 2007
Have you tried it by setting your Rectangular Marquee to "exact size?", then by using the Transform options to move the marquee into place?

I just tried it manually (i.e.: I didn’t record it as an Action) and it seemed to work OK.

Are you dead sure that some feathering isn’t being introduced somewhere?

Any "snapping" options taking over where you don’t want them to?
P
Phosphor
Feb 15, 2007
Heya, Daryl…

Have a go with the Action I made, below.

But…OOPS! I made it using a 320px × 320px document, but as you’ll see when you run it on a document that size, it works perfectly. Also, you’ll notice I used "View—>New Guide…" to create the 4 × 4 grid instead of slices. Dunno if that makes a difference or not.

Proof of concept, and all.

🙂

< http://home.comcast.net/~phoz/bbs/PhosphorDigital-4x4_tiles. zip> EDIT: You may have to add the ".atn" extension after you unZIP the file and before you load it.

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

Related Discussion Topics

Nice and short text about related topics in discussion sections