I have an image I want to draw a 1px black border around. When I increase the canvas size the extra space will be transparent; I can't select a color here. Ordinarily I would increase the canvas by 2 transparent pixels, then placing a solid black layer underneath would do the trick.
However, my picture is a graph in PNG with a transparent background. If I try the above the whole background will turn black. How can I draw a border around a transparent image?
What happens if I enlarge by 1 (equally transparent) pixel around and slide a solid black layer underneath:
This is perfectly to be expected. If the original didn't have transparency only the extra pixels at the border would show in black. Hope this makes it more clear.