I photograph a leaf on a blue background. The original image is 6000x4000. I want to make the background transparent. So I use the Color Range selection tool to select most of the blue background. Then I use Select and Mask to tidy up.
In particular, I need to remove some dust spots from around the leaf and select areas the Color Range selection missed. I invert the selection so that the leaf and dust spots are surrounded by marching ants. Then I use the lasso tool in subtract mode to select large areas around the outside of leaf, thus deselecting any dust and left over blue. I run the lasso tool well outside the borders of the image so that I am cleaning up right to the edge of the image. Then I save out to New Layer With Layer Mask.
The problem comes when I "Export As" that created layer+mask so that I can end up with a PNG file with transparency. The size of the image as reported in the Export As dialog is now smaller - Might be an odd number like 5829x3650. I have determined that this size reduction happens when I have used the lasso tool outside the image and essentially deselected an entire original edge. It's hard to explain.
But I think PS thinks its doing me a favor by reducing the image (and canvas) size to only the part containing the selected leaf. Changing the canvas size back to 6000x4000 will indeed export a 6000x4000 image, but then the registration of the leaf is off (it has shifted location relative to the original image). This is important, because later, I will also export the black and white mask (which remains at 6000x4000 for some reason). I need the mask for other operations, but the exported leaf must be registered with the exported mask.
So, is this normal behavior? It sure surprised me. Is there any way to prevent Select and Mask from changing the size of the image? I think this also happens if you use the selection brush and brush all along an edge. Any other ideas about how to restore the image size without shifting the location of the leaf?
First: Just about to close lasso loop selecting area to remove from selection. Note that includes the entire top border
Second: The "Export As" dialog showing that the image size has changed, and its consistent with more or less having deleted the top part of the image where the lasso tool was used