I have a group with a transparent rectangle as the background, I’d like to export the group, make the exported png the same size as the background rectangle.
but sketch automatically trims my transparent pixels.
This is the layer hierarchy:
The Rectangle 6 is transparent and of size 50 * 50, the star 12 is in solid color and has a size of 32 * 32, I’d like to export this group as a 50 * 50 png.
I am using sketch version 3.2.2.
Answer
Got 2 answers for you…
- Select Rectangle 6 and click on make exportable, now click Create Separate Slice Layer (the little knife) and simply drag the shown image to your desktop to export it.
- (The better answer) Instead of using a transparent rectangle, create an Artboard. Hit A and drag a 50×50 box. Add your star, select the Artboard and click Make Exportable and finally drag the shown image to your desktop.
Attribution
Source : Link , Question Author : CarmeloS , Answer Author : M. Appelman