Mobile app version of vmapp.org
Login or Join
Murphy569

: Sketch3: export a group and keep the size of the transparent background I have a group with a transparent rectangle as the background, I'd like to export the group, make the exported png the

@Murphy569

Posted in: #Background #SketchApp #Transparency

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.

10.07% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy569

7 Comments

Sorted by latest first Latest Oldest Best

 

@Steve758

For me as a developer who received ready sketch file, the fastest way is to open image in Photoshop, go to 'Image → Canvas Size', change the size and save it.

10% popularity Vote Up Vote Down


 

@Mendez620

This might be too old but it can help others..

According to the answer of @spjpgrd , this option will appear if you put your layer out of any artboards.

10% popularity Vote Up Vote Down


 

@Harper654

Select group 1star, then make right click on it, select Create Symbol, then go to Symbols page, select artboard with your new symbol and setup export settings on right panel - this workflow works as simple artboard for every group, but is powered by Symbols reuse feature.

10% popularity Vote Up Vote Down


 

@Chiappetta793

Do the following:


Select layers to export
Press Layers -> Flatten to Bitmap
Drag bitmap from left list to the desktop

10% popularity Vote Up Vote Down


 

@Bryan765

Alternative and simple solution:

Change de border Thichnkess to 0.01px or something below, and when exports, the outline is not rendered.



It works.

10% popularity Vote Up Vote Down


 

@Cooney243

The artboard method is the way to go.

If you already have that 50x50 transparent rectangle, if you select the group and press "A" to create a new artboard, the first option on the right-hand side is "Around Selection." Super handy.

10% popularity Vote Up Vote Down


 

@Frith110

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 50x50 box. Add your star, select the Artboard and click Make Exportable and finally drag the shown image to your desktop.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme