Class: PSD::BrightnessContrast
- Defined in:
- lib/psd/layer/info/brightness_contrast.rb
Overview
NOTE: this only has the correct values when the “Use Legacy” checkbox is checked. If the ‘CgEd’ info key is present, these values will all be 0. Use that info block instead.
Instance Attribute Summary collapse
-
#brightness ⇒ Object
readonly
Returns the value of attribute brightness.
-
#contrast ⇒ Object
readonly
Returns the value of attribute contrast.
-
#lab_color ⇒ Object
readonly
Returns the value of attribute lab_color.
-
#mean_value ⇒ Object
readonly
Returns the value of attribute mean_value.
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
#brightness ⇒ Object (readonly)
Returns the value of attribute brightness.
12 13 14 |
# File 'lib/psd/layer/info/brightness_contrast.rb', line 12 def brightness @brightness end |
#contrast ⇒ Object (readonly)
Returns the value of attribute contrast.
12 13 14 |
# File 'lib/psd/layer/info/brightness_contrast.rb', line 12 def contrast @contrast end |
#lab_color ⇒ Object (readonly)
Returns the value of attribute lab_color.
12 13 14 |
# File 'lib/psd/layer/info/brightness_contrast.rb', line 12 def lab_color @lab_color end |
#mean_value ⇒ Object (readonly)
Returns the value of attribute mean_value.
12 13 14 |
# File 'lib/psd/layer/info/brightness_contrast.rb', line 12 def mean_value @mean_value end |
Class Method Details
.should_parse?(key) ⇒ Boolean
8 9 10 |
# File 'lib/psd/layer/info/brightness_contrast.rb', line 8 def self.should_parse?(key) key == 'brit' end |
Instance Method Details
#parse ⇒ Object
14 15 16 17 18 19 |
# File 'lib/psd/layer/info/brightness_contrast.rb', line 14 def parse @brightness = @file.read_short @contrast = @file.read_short @mean_value = @file.read_short @lab_color = @file.read_boolean end |