Count Number of Layers in Photoshop

14,581

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:

  1. From the status bar on the bottom left corner of the editing window, click on the right-pointing arrow.

Editing windows with status bar: The right-pointing arrow is highlighted.

  1. From the popup menu that appears, select "Layer Count".
  2. Read the number of layers on the status bar.

The status bar reads: 108 layers, 18 groups

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)

gimp psd layercount

Share:
14,581

Related videos on Youtube

Mayo
Author by

Mayo

UX Developer

Updated on September 18, 2022

Comments

  • Mayo
    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
    Mayo over 8 years
    Interesting. Unfortunately I'm not on a mac. I did see that when I googled. I didn't see that option for a PC.
  • AAGD
    AAGD over 8 years
    maybe this helps, on a quick glance it didn't look mac specific: blog.kyletunneyphotography.com/counting-layers-in-photoshop
  • Mayo
    Mayo over 8 years
    thx. 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
    Mayo over 8 years
    I 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
    Mayo over 8 years
    I'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
    Duck almost 8 years
    strangely this scripts reports 48 layers on a file that has 38 layers.. :(
  • fixer1234
    fixer1234 over 7 years
    @FleetCommand, thanks for demonstrating how to write a good answer.
  • Goosfraba
    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)