Count Number of Layers in Photoshop
Solution 1
You could use python psdtools package for this:
from __future__ import print_function
from psd_tools import PSDImage
psd = PSDImage.load('my_image.psd')
print("file has {} layers".format(len(psd.layers)))
Solution 2
Do the following:
- From the status bar on the bottom left corner of the editing window, click on the right-pointing arrow.
- From the popup menu that appears, select "Layer Count".
- Read the number of layers on the status bar.
Solution 3
Just a thought: If you're on a Mac, the Finder's file info (cmd-i) might be helpful, as it lists all names of the layers without even opening the file . You could copy this into a text editor with line numbering and replace all commas with linefeeds. The line numbering would reveal the number of layers (I havn't tested what happens with commas in layer names).
EDIT:
One more finding: Gimp has an info panel that shows the layer count for a psd file (Menu: Image > Image Properties
)
Related videos on Youtube
Comments
-
Mayo over 1 year
Is there a way to find out the number of layers there are in a .psd?
I have .psds that are slowing down terribly. There are 20-30 layer comps and an unknown amount of layers. 1000? 5,0000? I don't know.
The reason for this is to start to ascertain at what point photoshop starts to choke. If I have photoshop use 90 of available memory it quickly hogs up 11GB slowing down my box for other purposes and if I leave it at 50% (7GB) there is a pause when I duplicate even the smallest layer (say a checkmark that goes into a checkbox).
-
Mayo over 8 yearsInteresting. Unfortunately I'm not on a mac. I did see that when I googled. I didn't see that option for a PC.
-
AAGD over 8 yearsmaybe this helps, on a quick glance it didn't look mac specific: blog.kyletunneyphotography.com/counting-layers-in-photoshop
-
Mayo over 8 yearsthx. I saw that while searching (after posting) and I see that Rishab Ag copied and pasted the text from that site. Will try it out.
-
Mayo over 8 yearsI tried this script twice. It crashed Photoshop both times. Maybe it works with a file with 10 layers. But it hasn't worked on a file with hundreds. Or is it thousands?
-
Mayo over 8 yearsI'm having trouble downloading this package at work. I'm not getting admin access to download psdtools (or 7-zip). Will check it out at home.
-
Duck almost 8 yearsstrangely this scripts reports 48 layers on a file that has 38 layers.. :(
-
fixer1234 over 7 years@FleetCommand, thanks for demonstrating how to write a good answer.
-
Goosfraba over 7 years@Burgi Yes, i know, but i was kinda amazed by the complicated coding and stuff versus a 2 clicks solutions (compensated with pictures tho)