Class: PSD::ContentGenerator
Overview
This is the new way that Photoshop stores the brightness/contrast data. If this data is present, DO NOT use the legacy BrightnessContrast info block.
Instance Attribute Summary
Attributes inherited from LayerInfo
#data
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from LayerInfo
#initialize, #skip
Constructor Details
This class inherits a constructor from PSD::LayerInfo
Class Method Details
.should_parse?(key) ⇒ Boolean
8
9
10
|
# File 'lib/psd/layer/info/content_generator.rb', line 8
def self.should_parse?(key)
key == 'CgEd'
end
|
Instance Method Details
#auto ⇒ Object
38
39
40
|
# File 'lib/psd/layer/info/content_generator.rb', line 38
def auto
@data['Auto']
end
|
#brightness ⇒ Object
18
19
20
|
# File 'lib/psd/layer/info/content_generator.rb', line 18
def brightness
@data['Brgh']
end
|
#contrast ⇒ Object
22
23
24
|
# File 'lib/psd/layer/info/content_generator.rb', line 22
def contrast
@data['Cntr']
end
|
#lab_color ⇒ Object
30
31
32
|
# File 'lib/psd/layer/info/content_generator.rb', line 30
def lab_color
@data['Lab ']
end
|
#mean_value ⇒ Object
26
27
28
|
# File 'lib/psd/layer/info/content_generator.rb', line 26
def mean_value
@data['means']
end
|
#parse ⇒ Object
12
13
14
15
16
|
# File 'lib/psd/layer/info/content_generator.rb', line 12
def parse
@file.seek 4, IO::SEEK_CUR
@data = Descriptor.new(@file).parse
end
|
#use_legacy ⇒ Object
34
35
36
|
# File 'lib/psd/layer/info/content_generator.rb', line 34
def use_legacy
@data['useLegacy']
end
|