--- PsdImagePlugin.py.bak	2008-07-21 23:21:28.000000000 +0900
+++ PsdImagePlugin.py	2008-07-22 11:44:05.000000000 +0900
@@ -198,9 +198,28 @@
 
         # skip over blend flags and extra information
         filler = read(12)
-        name = None # FIXME
-        file.seek(i32(read(4)), 1)
-
+        name = ""
+        size = i32(read(4))
+        combined = 0
+        if size:
+            length = i32(read(4))
+            if length:
+                mask_y = i32(read(4)); mask_x = i32(read(4))
+                mask_h = i32(read(4)) - mask_y; mask_w = i32(read(4)) - mask_x
+                file.seek(length - 16, 1)
+            combined += length + 4
+		    
+            length = i32(read(4))
+            if length:
+                file.seek(length, 1)
+            combined += length + 4
+			
+            length = ord(read(1))
+            if length:
+                name = read(length)
+            combined += length + 1
+		
+        file.seek(size - combined, 1)
         layers.append((name, mode, (x0, y0, x1, y1)))
 
     # get tiles
