You can crop and image with the Crop Tool, to cut away extra space and improve the composition. Using Image ‣ Trim to Current Layer, Krita resizes the image to the dimensions of the layer selected. Useful for when you paste a too large image into the layer and want to resize the canvas to the extent of this layer.