Hello, currently using Pixelmator Pro Version 2.0.3 Junipero.
I recently learned of the trick where dragging layers from Pixelmator into a Finder window will export each layer as an individual file. However, if I do this with PNG images that have transparent borders between the edge of the canvas and the visible portion of the image, the image is reduced in size until there is no transparent border.
I'm not really intending to "Export for Web"; I'm simply trying to save the entirety of each layer. Is there an Export option that doesn't attempt this optimization?
Thanks!
"Export for Web" choosing its own canvas size
2021-03-11 05:48:51
Hi Aurelija, thanks for responding. I've upgraded to 2.0.6. I actually think the behavior is intentional, because if you select layers and choose 'Add for Export' from the context menu, web-based 'slicing' tool guides appear:
As you can see, the exports for the layers 'green' and 'red' have sizes related to their content (103x106, 207x198), unrelated to the exposed canvas size (256x256). The "presets" menu for PNGs has a "keep transparency" option but that's only for the actual alpha channel of the resultant PNG, not anything related to the dimensions of the canvas.
Thanks!
As you can see, the exports for the layers 'green' and 'red' have sizes related to their content (103x106, 207x198), unrelated to the exposed canvas size (256x256). The "presets" menu for PNGs has a "keep transparency" option but that's only for the actual alpha channel of the resultant PNG, not anything related to the dimensions of the canvas.
Thanks!
2021-03-15 15:08:53
Oh, that explains it! Thanks for clarifying. That is, indeed, expected behavior if we're talking Add for Export. It's really meant to isolate and export just the contents of the layer, regardless of the rest of the design. Since the transparent background is its own separate layer, it's not taken into account. So, you have two options here:
a) Manually expand the bounds of a slice to also include the background layer.
b) Don't add individual layers for export but Export for Web the entire image. Before dragging and dropping the images to Finder, simply hide the unnecessary layers.
a) Manually expand the bounds of a slice to also include the background layer.
b) Don't add individual layers for export but Export for Web the entire image. Before dragging and dropping the images to Finder, simply hide the unnecessary layers.
2021-03-18 15:59:39
Since these are quite specific export conditions, only one option comes to mind — scripting. If you have experience with AppleScript, you should be able to set up a workflow that automates this whole process. Let's say, you can tell Pixelmator Pro to hide all layers except the background one, then go through every other layer by revealing, exporting, and hiding it again.