Trimming canvas after removing background

Talk about Pixelmator Pro, share tips & tricks, tutorials, and other resources.
User avatar

2020-07-15 15:58:22

I regularly work with stock images that come with a white background.

It’s easy enough to remove the background with colour selection, but I’m having trouble trimming the canvas to the size of the remaining image.

It looks like that even the the background has been removed, the image still retains it’s original frame size, as when I drag it around, the frame is the same size as the original image, and the transparent pixels can’t be trimmed to size automatically.

Is there a way around this other than using the crop tool manually each time?
User avatar

2020-07-17 09:36:18

Just to clarify, does choosing Image > Trim Canvas not trim the canvas automatically? If so, I have a feeling there may be a few stray pixels somewhere getting in the way. Could you maybe share an example image with me so I could take a look?
User avatar

2020-07-17 11:10:19

Hi Andrius,

Sure, image attached.

Image
User avatar

2020-07-17 12:04:42

Ah, yes, I can see Smart Erase will leave some corner pixels in cases like this. If you zoom in to any corner, you'll see there are a few remaining pixels. These are left behind due to the way our edge smoothing algorithm works. You can either choose the erase tool and click each corner with it after using Smart Erase, or turn off Smooth Edges (for Smart Erase or Select Color). But with the latter option, the edges won't look very good, so I'd personally probably use the erase the four corners option. After that, Trim Canvas should work just fine.
User avatar

2020-07-17 12:22:06

Thanks Andrius, deleting the corners worked perfectly!