Crop image symbol to content

Hi,

If I generate an image from a symbol the resulting image is surrounded by some margins.

For example this code:

let image = UIImage(systemName: "suit.heart")

will generate this image:

As you can see there are some margins around the content.

There is a way to build an image cropped to the actual content, like showed in the below example?

Thank you

Crop image symbol to content
 
 
Q