GNOME Bugzilla – Bug 753986
file-psd: manage layer resource block lnsr
Last modified: 2015-09-06 14:58:04 UTC
With gimp sources updated today, when opening a specific psd (that I can't attach), I get this: (file-psd:30817): file-psd-DEBUG: Process unknown layer resource block: lnsr (Gimp launched like this: G_MESSAGES_DEBUG=all ./gimp-beta/build/bin/gimp-2.9 ) Reading http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/, it just corresponds to "Layer name source". I'll give it a try.
Quite confusing to get the difference between lnsr and lyid if lyid is lyr_a->id, what use would be lyid?
I meant, what use would be lnsr
I have no idea, but maybe you can cook up a patch that at least loads the block?
About lnsr, it seems it corresponds to a the old name of the layer on 4 characters in MacRoman (it supposes to ref a lib to decode MacRoman). Nowadays name seems to be "luni". So except if we want to manage old psds, perhaps we should just ignore "lnsr". See: in https://github.com/layervault/psd.rb/wiki/Anatomy-of-a-PSD-File (search "layer name) ruby code for these: https://github.com/layervault/psd.rb/blob/master/lib/psd/layer/info/layer_name_source.rb (lnsr) https://github.com/layervault/psd.rb/blob/master/lib/psd/layer/info/unicode_name.rb (luni) It's quite depressing to read Anatomy-of-a-PSD-File because it seems we don't have all the specs and the existing one (https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/) may be incorrect in some points :-( (see "A Little Background on Binary Files" part) To sum up, I can propose a patch to read this part but ignore it. Anyway, I had begun to read Adobe Specs and compare with implementation and other than Gimp implementations. I had sent you a patch for a first rework.
Created attachment 310724 [details] [review] proposed patch This patch is based on master from 2015-09-05 (0593eaa7c36b06e077cf1c0fceb06f204b4f5131)
Thanks, pushed to master: commit 5a2757c6ec5d6f44d74a69bc75da8bdda2585eae Author: Julien Nabet <serval2412@yahoo.fr> Date: Sat Sep 5 22:46:16 2015 +0200 Bug 753986 - manage layer resource block lnsr Layer name source (id on 4 characters encoded in MacRoman). psd from PS>5 have "luni" (Layer Unicode) See https://bugzilla.gnome.org/show_bug.cgi?id=753986#c4 for more details Janitorial on lyvr: move IFDBG at the beginning of the function +change the content of it plug-ins/file-psd/psd-layer-res-load.c | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-)