If I select a specific area, I want to increase that selection by one pixel in all directions. I know that I can do that through the Grow function. But I also want to fill in the pixels that have been added with the pixel border of the previous selection.
How can I achieve this?
Image for explaining what I want to achieve:
Reason: (for anyone who is wondering, why?)
I have a sprite sheet with a size of 28x15 tiles each made of 32x32 pixels. I use this sprite sheet in Unity3d and split it into 32x32 pixel sprites.
The problem with this is that sometimes scaling the sprites does not work 100% correctly. Unity then automatically uses adjacent pixel columns or lines to fill in the blanks. Since these rows/columns are part of a new sprite, it sometimes causes strange lines between the sprites.
So I want to create a buffer around each sprite. The tiles then have a size of 34x34, but only the inner 32x32 are used in the sprites and the border around it is a buffer to avoid these lines