psd.js icon indicating copy to clipboard operation
psd.js copied to clipboard

PSD with RGB channel 16 or higher can not be correctly parsed

Open qichaoch opened this issue 7 years ago • 11 comments

Psd with RGB channel 16 has no children in layers property after the file is parsed. But after I change the RGB channel to be 8, all layers can be found.

Here is my code var PSDAPP = require("psd"); // var file = "friend.psd"; var file = "sample16.psd"; PSDAPP.open(file).then(function(psd){ var retTree = psd.tree(); console.log(retTree); });

testFiles.zip

qichaoch avatar Sep 14 '17 07:09 qichaoch

Hey @qichaoch. I am at the moment not able to research your issue. I will do this over the weekend and report what my findings are in this issue thread.

fabulousduck avatar Sep 14 '17 16:09 fabulousduck

Hey @qichaoch. after a little look in the color.coffee file, You can see that it only converts to 8 bit colors and not 16 bit. I will experiment a little bit to see if i can make it work for 16 bit.

Also, I have noticed that the friend_16.psd only has one layer ? Is this supposed to be this way? because without the layer ofcourse there wont be any layers as there are none in the file

fabulousduck avatar Sep 16 '17 17:09 fabulousduck

PSD.rb has 16-bit support so it shouldn't be too difficult to implement.

-- Ryan LeFevre (@meltingice) Sr. Software Engineer HODINKEE


From: Ryan Vlaming [email protected] Sent: Saturday, September 16, 2017 1:35:55 PM To: meltingice/psd.js Cc: Subscribed Subject: Re: [meltingice/psd.js] PSD with RGB channel 16 or higher can not be correctly parsed (#105)

Hey @qichaochhttps://github.com/qichaoch. after a little look in the color.coffeehttps://github.com/meltingice/psd.js/blob/master/lib/psd/color.coffee#L6 file, You can see that it only converts to 8 bit colors and not 16 bit. I will experiment a little bit to see if i can make it work for 16 bit.

Also, thank you for providing the files, this makes my life a lot easier when testing

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/meltingice/psd.js/issues/105#issuecomment-329983638, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAHtueEBm0crXY5tvdLr3fMuozQEgMRPks5sjAb7gaJpZM4PXI5_.

meltingice avatar Sep 16 '17 18:09 meltingice

I will see about making a PR for this tonight.

fabulousduck avatar Sep 18 '17 08:09 fabulousduck

@fabulousduck What's the status on this? I ran into the same problem today.

linkesch avatar Mar 01 '18 23:03 linkesch

Hi, I think I am having the same problem

slevy85 avatar Dec 16 '18 14:12 slevy85

Any news about this issue ?

aleczratiu avatar Nov 22 '19 14:11 aleczratiu

Seems like a fix on PR: https://github.com/meltingice/psd.js/pull/175

mihnsen avatar May 09 '21 19:05 mihnsen

Any update? @mihnsen that update was rejected.

velara3 avatar Feb 28 '24 01:02 velara3

Any update on this?

freakpazo avatar Feb 29 '24 16:02 freakpazo

Can someone patch make a PR for this? Also, is there two repositories / two branches of psd.js? If so why?

velara3 avatar Mar 10 '24 19:03 velara3