Class: PSD::UnicodeName
- Defined in:
- lib/psd/layer_info/unicode_name.rb
Instance Attribute Summary
Attributes inherited from LayerInfo
Instance Method Summary collapse
Methods inherited from LayerInfo
Constructor Details
This class inherits a constructor from PSD::LayerInfo
Instance Method Details
#parse ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/psd/layer_info/unicode_name.rb', line 7 def parse pos = @file.tell len = @file.read_int * 2 @data = @file.read(len).unpack("A#{len}")[0].encode('UTF-8').delete("\000") # The name seems to be padded with null bytes. This is the easiest solution. @file.seek pos + @length return self end |