Requires two types of layers (LayerType.OPEN_FOLDER and
LayerType.CLOSED_FOLDER) instead of LayerType.FOLDER.
See "Section divider setting (Photoshop 6.0)" at
http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/
In the class psd.parser.layer.additional.LayerSectionDividerParser replace the
code from
--
switch (dividerType) {
case 1:
case 2:
type = LayerType.FOLDER;
break;
case 3:
type = LayerType.HIDDEN;
break;
}
--
to
--
switch (dividerType) {
case 1:
type = LayerType.OPEN_FOLDER;
break;
case 2:
type = LayerType.CLOSED_FOLDER;
break;
case 3:
type = LayerType.HIDDEN;
break;
}
--
and change psd.model.AbstractPsd.makeLayersHierarchy(layers) method.
When you open some files (probably from the Adobe Photoshop CS5) see the error:
Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException
at java.util.LinkedList.remove(LinkedList.java:788)
at java.util.LinkedList.removeFirst(LinkedList.java:134)
at psd.model.AbstractPsd.makeLayersHierarchy(AbstractPsd.java:95)
at psd.model.AbstractPsd.<init>(AbstractPsd.java:71)
at psd.model.Psd.<init>(Psd.java:11)
Original issue reported on code.google.com by debugger...@gmail.com on 5 Apr 2012 at 10:24
Original issue reported on code.google.com by
debugger...@gmail.com
on 5 Apr 2012 at 10:24