Copy link to clipboard
Copied
Hello, I have a 1024px picture which I divide into 16 square slices with the guides and the slice tool in Photoshop. I want to export each slice as an individual png image but keeping their position within the 1024px canvas. When I export with this method, it exports all slices separately but each resulting image is 256px wide. What I need is exporting the orginal 1024px square canvas picture with each slice showing up individually in separate pictire while keeping its position within the canvas.
Manually it would be: select each 256px slice and copy paste it into a different layer, and then export each layer separately. Which is very time consuming and I would want to know if there is an automatic way of doing this. Thanks.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Posting images and uploading your files increases your chances to be better served.
Copy link to clipboard
Copied
Good suggestion, visuals always help.
Copy link to clipboard
Copied
Ah, I see where you're coming from. I think that I misunderstood... Reading again it sounds like a request for revealing each slice, maintaining canvas size as transparent pixels. Not something originally intended by slice and save for web.
The script from jazz-y in the first link will copy each slice to a separate layer as a start point. There are other scripts which can divide using guides. It will be a matter of retaining canvas size and transparency for each layer.
Copy link to clipboard
Copied
3 hours ago I recieved E-Mail notification with your post but starting with: @Ladxenmark
Copy link to clipboard
Copied
Hello, thank you. I have done some progress. I managed to automatically split the image into the 16 slices and get each slice into its layer, through the script mentioned in the first link. The so called Pfaffenbichler script.
So, up to this point what I did is:
1. Open the 1024px square image
2. New Guides Layout 4 columns 4 rows.
3. Select slice tool. Enable Slices from guides which I don't see clearly when it's activated.
4. Run the mentioned script.
5. The result is that now, I have 16 layers each containing a 256px square slice.
From this point I don't know how to export each layer as png while keeping its position within the canvas, thus, each png should have the original canvas size of 1024 x 1024. I tried with the File > Export > Layers to Files tool, but it does not happen anything and Photoshop gets frozen.
So I attach the sample picture and the desired results.
Copy link to clipboard
Copied
I finally managed to do it with this other script as a second step: https://damienfremont.com/2019/05/25/how-to-photoshop-script-export-layers-to-png-files/
Excellet. Thank you all very much for your help. Very nice to see so much help in this forum.
Copy link to clipboard
Copied
This script doesn't export layers but save them.
Copy link to clipboard
Copied
Hum, I'm not sure I understand the different between export and save. It saves the pcitures in png on a local folder, just like I needed it to be.
Copy link to clipboard
Copied
Export is usually for single layers, often used for web, and can be free of metadata.
Copy link to clipboard
Copied
Could you link as to that c.pfaffenbichler script?
Copy link to clipboard
Copied
Sure, the script I used for placing each slice into a separate layer is: https://community.adobe.com/t5/photoshop-ecosystem-discussions/divide-my-image-to-layers/m-p/1246752... The script that starts with
// split Image to layer according to guides;
Copy link to clipboard
Copied
Okay, now I see it in post of recently died JJMack
Find more inspiration, events, and resources on the new Adobe Community
Explore Now