Thanks for the quick answer - I managed to get this done, nice! I still don’t fully understand the "Clip Canvas" command, though, sometimes it works, sometimes it does nothing. I am guessing that it clips the canvas according to the outermost elements it can find. So I have a pixel layer (my image) that is masked as described, and above it some adjustment layers. If I select the pixel layer and select "Clip Canvas", nothing happens, but if I flatten all visible layers, it works. Does that mean that the adjustment layers' masks determine the size that the canvas will be clipped to, and since they are all white, nothing happens?