Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Plugin and Companion App SDK
Viewing all articles
Browse latest Browse all 54282

Writing PSD with layers

$
0
0

I'm trying to generate a Photoshop file with Adjustment Layers. Does anyone have any pointers, or know of any methods of diagnosing problems in the file?

 

I've been able to make a file with multiple image layers which opens correctly in Photoshop. But when I try to make an adjustment layer, Photoshop won't open it, giving me the error: "Could not complete your request because the file is not compatible with this version of Photoshop." I've tried adding various Image Resources and other bits, to no avail.

 

The few third party PSD parsers I've used don't seem to find any problem with the files I generate. For example, "psdparse" gives a very verbose breakdown of the file, and finds no errors.

 

Here's a link to a sample file: http://bensyverson.com/share/photoshop/test.psd (warning: 15MB link)

 

And here's the psdparse output:

 

Processing "../../Adobe/test.psd"

  PSD (version 1), 3 channels, 1936 rows x 2592 cols, 8 bit RGBColor

  (color mode data is empty)

 

 

Image resources (506 bytes):

  resource '8BIM' ( 1028,""):   15 bytes [IPTC-NAA record (File Info)]

  resource '8BIM' ( 1005,""):   16 bytes [ResolutionInfo]

    Resolution 72 x 72 pixels per inch

  resource '8BIM' ( 1026,""):    4 bytes [Layers group info]

  resource '8BIM' ( 1011,""):    8 bytes [Print flags]

  resource '8BIM' ( 1034,""):    1 bytes [Copyright flag]

  resource '8BIM' (10000,""):   10 bytes [Print flags info]

  resource '8BIM' ( 1013,""):   72 bytes [Color halftoning info]

  resource '8BIM' ( 1016,""):  112 bytes [Color transfer functions]

  resource '8BIM' ( 1024,""):    2 bytes [Layer state info]

  resource '8BIM' ( 1032,""):   16 bytes [Grid and guides info]

  resource '8BIM' ( 1057,""):   45 bytes [Version Info]

  resource '8BIM' ( 1044,""):    4 bytes [Document specific IDs]

  resource '8BIM' ( 1069,""):    6 bytes [Layer Selection ID(s)]

  resource '8BIM' ( 1010,""):   10 bytes [Background color]

  resource '8BIM' ( 1041,""):    1 bytes [ICC Untagged Profile]

 

 

2 layers:

 

 

  layer 0: (   0,   0,1936,2592), 3 channels (1936 rows x 2592 cols)

    channel  0: 5018114 bytes, id= 0  (R)

    channel  1: 5018114 bytes, id= 1  (G)

    channel  2: 5018114 bytes, id= 2  (B)

  (extra data: 256 bytes @ 602)

  (no layer mask)

  ...skipped layer blending ranges (40 bytes)

    name: "Background"

 

 

  layer 1: (   0,   0,   0,   0), 5 channels (   0 rows x    0 cols)

    channel  0:       2 bytes, id=-1  (transparency mask)

    channel  1:       2 bytes, id= 0  (R)

    channel  2:       2 bytes, id= 1  (G)

    channel  3:       2 bytes, id= 2  (B)

    channel  4:       2 bytes, id=-2  (layer mask)

  (extra data: 324 bytes @ 922)

  (has layer mask)

  ...skipped layer blending ranges (40 bytes)

    name: "Curve"

## layer data begins @ 1246

## layer image data begins @ 1246

 

 

  layer 0 ("Background"):

  blending mode: sig='8BIM' key='norm'(normal) opacity=255(100%) clipping=0(base)

    flags=0x9(transp_prot(1) visible(0) bit4valid(1) pixel_data_irrelevant(0))

Layer 0 additional data:

    data block: sig='8BIM' key='luni' length=     24

    (Unicode name = 'Background')

    data block: sig='8BIM' key='lnsr' length=      4

    (Layer name source = 'bgnd')

    data block: sig='8BIM' key='lyid' length=      4

    (Layer ID = 1)

    data block: sig='8BIM' key='clbl' length=      4

    (Blend clipping = 1)

    data block: sig='8BIM' key='infx' length=      4

    (Blend interior = 0)

    data block: sig='8BIM' key='knko' length=      4

    (Knockout = 0)

    data block: sig='8BIM' key='lspf' length=      4

    (Protected = 5)

    data block: sig='8BIM' key='lclr' length=      8

    data block: sig='8BIM' key='shmd' length=      4

    data block: sig='8BIM' key='fxrp' length=     16

    (Reference point X=0 Y=0)

  channel 0:

>>> channel id =  0 @    1246, 5018114 bytes

    compression = 0 (raw)

    uncompressed size 5018112 bytes (row bytes = 2592)

  channel 1:

>>> channel id =  1 @ 5019360, 5018114 bytes

    compression = 0 (raw)

    uncompressed size 5018112 bytes (row bytes = 2592)

  channel 2:

>>> channel id =  2 @ 10037474, 5018114 bytes

    compression = 0 (raw)

    uncompressed size 5018112 bytes (row bytes = 2592)

 

 

  layer 1 ("Curve"):

  blending mode: sig='8BIM' key='norm'(normal) opacity=255(100%) clipping=0(base)

    flags=0x18(transp_prot(0) visible(0) bit4valid(1) pixel_data_irrelevant(1))

Layer 1 additional data:

    data block: sig='8BIM' key='curv' length=     48

    data block: sig='8BIM' key='luni' length=     16

    (Unicode name = 'Curve')

    data block: sig='8BIM' key='lnsr' length=      4

    (Layer name source = 'cont')

    data block: sig='8BIM' key='lyid' length=      4

    (Layer ID = 2)

    data block: sig='8BIM' key='clbl' length=      4

    (Blend clipping = 1)

    data block: sig='8BIM' key='infx' length=      4

    (Blend interior = 0)

    data block: sig='8BIM' key='knko' length=      4

    (Knockout = 0)

    data block: sig='8BIM' key='lspf' length=      4

    (Protected = 0)

    data block: sig='8BIM' key='lclr' length=      8

    data block: sig='8BIM' key='shmd' length=      4

    data block: sig='8BIM' key='fxrp' length=     16

    (Reference point X=0 Y=0)

  channel 0:

>>> channel id = -1 @ 15055588, 2 bytes

    compression = 0 (raw)

    uncompressed size 0 bytes (row bytes = 0)

  channel 1:

>>> channel id =  0 @ 15055590, 2 bytes

    compression = 0 (raw)

    uncompressed size 0 bytes (row bytes = 0)

  channel 2:

>>> channel id =  1 @ 15055592, 2 bytes

    compression = 0 (raw)

    uncompressed size 0 bytes (row bytes = 0)

  channel 3:

>>> channel id =  2 @ 15055594, 2 bytes

    compression = 0 (raw)

    uncompressed size 0 bytes (row bytes = 0)

  channel 4:

>>> channel id = -2 @ 15055596, 2 bytes

# layer mask (   0,   0,   0,   0) (   0 rows x    0 cols)

    compression = 0 (raw)

    uncompressed size 0 bytes (row bytes = 0)

## end of layer image data @ 15055598

  (global layer mask info section: 16 bytes)

## global additional info @ 15055618 (36 bytes)

    data block: sig='8BIM' key='Patt' length=      0

    (data: Pattern)

   

    data block: sig='8BIM' key='FMsk' length=     12

    (data: Filter mask)

    00 00 ff ff 00 00 00 00 00 00 00 32

 

 

  merged image:

>>> merged image data @ 15055654

    compression = 1 (RLE)

    uncompressed size 15054336 bytes (row bytes = 2592)

  done.

 


Viewing all articles
Browse latest Browse all 54282

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>