Class: PSD::Exposure
- Defined in:
- lib/psd/layer/info/exposure.rb
Instance Attribute Summary collapse
-
#exposure ⇒ Object
readonly
Returns the value of attribute exposure.
-
#gamma ⇒ Object
readonly
Returns the value of attribute gamma.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Attributes inherited from LayerInfo
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from LayerInfo
Constructor Details
This class inherits a constructor from PSD::LayerInfo
Instance Attribute Details
#exposure ⇒ Object (readonly)
Returns the value of attribute exposure.
9 10 11 |
# File 'lib/psd/layer/info/exposure.rb', line 9 def exposure @exposure end |
#gamma ⇒ Object (readonly)
Returns the value of attribute gamma.
9 10 11 |
# File 'lib/psd/layer/info/exposure.rb', line 9 def gamma @gamma end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
9 10 11 |
# File 'lib/psd/layer/info/exposure.rb', line 9 def offset @offset end |
Class Method Details
.should_parse?(key) ⇒ Boolean
5 6 7 |
# File 'lib/psd/layer/info/exposure.rb', line 5 def self.should_parse?(key) key == 'expA' end |
Instance Method Details
#parse ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/psd/layer/info/exposure.rb', line 11 def parse @file.seek 2, IO::SEEK_CUR # Why this shit is big endian is beyond me. Thanks Adobe. @exposure = @file.read(4).unpack('g')[0] @offset = @file.read(4).unpack('g')[0] @gamma = @file.read(4).unpack('g')[0] end |