meltingice / psd.js

A Photoshop PSD file parser for NodeJS and browsers
MIT License
2.75k stars 391 forks source link

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

Open qichaoch opened 7 years ago

qichaoch commented 7 years ago

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

fabulousduck commented 7 years ago

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 commented 7 years ago

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

meltingice commented 7 years ago

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 notifications@github.com 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_.

fabulousduck commented 7 years ago

I will see about making a PR for this tonight.

linkesch commented 6 years ago

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

slevy85 commented 5 years ago

Hi, I think I am having the same problem

aleczratiu commented 4 years ago

Any news about this issue ?

mihnsen commented 3 years ago

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

velara3 commented 8 months ago

Any update? @mihnsen that update was rejected.

freakpazo commented 8 months ago

Any update on this?

velara3 commented 8 months ago

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