psd 3.5.0 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94c708889f40e2d66fa1f271bbe5a2f385fcfef3
4
- data.tar.gz: ff0cf841ac51420fe267285c725cc44191396fac
3
+ metadata.gz: b21fcce85fa8ca2b9b08cdc8cf21229c58fb021b
4
+ data.tar.gz: 7b69b3e52405e5d44ad663323d355bf284c4c455
5
5
  SHA512:
6
- metadata.gz: 5a315bcfd5bf734cfcb2d712b0df72569ee42e34fd593072c91923119ccdcd5a5b5b785ae250af2ef82dda47abf847131eeae4c658a870e7d661977a90cdfb12
7
- data.tar.gz: 0666ac938c7f75cc01aff7e60f3fc3c6a7f28d366e4703199fa1ccc1dc292796b111cf877bc803d552db97c06d0b7ce6a151e003fef1afc2f28ecd87bcdc5b1e
6
+ metadata.gz: 05eaf2063a9814f935f558a28a2b9fa435f4e4a3ac431e66a497f4b302985d0b0bf7c9f84d69a17e31ae7bf664ac378c4aee7823155aca47e3d37fbfe2e81c53
7
+ data.tar.gz: 64d5cdc4f06316b520d1b1ea13e391153a05593cc026582152e23a64d716a8fdeac34abc355d2bc95d05b38293d589773da563e27c8cdb56b57c33a5fb2e2eba
@@ -2,6 +2,7 @@ require 'psd/layer/info/black_white'
2
2
  require 'psd/layer/info/blend_clipping_elements'
3
3
  require 'psd/layer/info/blend_interior_elements'
4
4
  require 'psd/layer/info/brightness_contrast'
5
+ require 'psd/layer/info/channel_blending_restrictions'
5
6
  require 'psd/layer/info/channel_mixer'
6
7
  require 'psd/layer/info/color_balance'
7
8
  require 'psd/layer/info/color_lookup'
@@ -13,6 +14,8 @@ require 'psd/layer/info/gradient_fill'
13
14
  require 'psd/layer/info/gradient_map'
14
15
  require 'psd/layer/info/hue_saturation'
15
16
  require 'psd/layer/info/invert'
17
+ require 'psd/layer/info/knockout'
18
+ require 'psd/layer/info/layer_mask_as_global_mask'
16
19
  require 'psd/layer/info/layer_group'
17
20
  require 'psd/layer/info/layer_id'
18
21
  require 'psd/layer/info/layer_name_source'
@@ -32,9 +35,11 @@ require 'psd/layer/info/selective_color'
32
35
  require 'psd/layer/info/sheet_color'
33
36
  require 'psd/layer/info/solid_color'
34
37
  require 'psd/layer/info/threshold'
38
+ require 'psd/layer/info/transparency_shapes_layer'
35
39
  require 'psd/layer/info/typetool'
36
40
  require 'psd/layer/info/unicode_name'
37
41
  require 'psd/layer/info/vector_mask'
42
+ require 'psd/layer/info/vector_mask_as_global_mask'
38
43
  require 'psd/layer/info/vector_origination'
39
44
  require 'psd/layer/info/vector_stroke'
40
45
  require 'psd/layer/info/vector_stroke_content'
@@ -49,6 +54,7 @@ class PSD
49
54
  blend_clipping_elements: BlendClippingElements,
50
55
  blend_interior_elements: BlendInteriorElements,
51
56
  brightness_contrast: BrightnessContrast,
57
+ channel_blending_restrictions: ChannelBlendingRestrictions,
52
58
  channel_mixer: ChannelMixer,
53
59
  color_balance: ColorBalance,
54
60
  color_lookup: ColorLookup,
@@ -60,6 +66,8 @@ class PSD
60
66
  gradient_map: GradientMap,
61
67
  hue_saturation: HueSaturation,
62
68
  invert: Invert,
69
+ knockout: Knockout,
70
+ layer_mask_as_global_mask: LayerMaskAsGlobalMask,
63
71
  layer_id: LayerID,
64
72
  layer_name_source: LayerNameSource,
65
73
  legacy_type: LegacyTypeTool,
@@ -79,8 +87,10 @@ class PSD
79
87
  sheet_color: SheetColor,
80
88
  solid_color: SolidColor,
81
89
  threshold: Threshold,
90
+ transparency_shapes_layer: TransparencyShapesLayer,
82
91
  type: TypeTool,
83
92
  vector_mask: VectorMask,
93
+ vector_mask_as_global_mask: VectorMaskAsGlobalMask,
84
94
  vector_origination: VectorOrigination,
85
95
  vector_stroke: VectorStroke,
86
96
  vector_stroke_content: VectorStrokeContent,
@@ -0,0 +1,27 @@
1
+ require 'psd/layer_info'
2
+
3
+ class PSD
4
+ class ChannelBlendingRestrictions < LayerInfo
5
+ def self.should_parse?(key)
6
+ key == 'brst'
7
+ end
8
+
9
+ MODES = {
10
+ 'RGBColor' => ['R', 'G', 'B'],
11
+ 'CMYKColor' => ['C', 'M', 'Y', 'K']
12
+ }
13
+
14
+ attr_reader :restricted_channels, :restricted_channels_by_letter
15
+
16
+ def parse
17
+ @restricted_channels = []
18
+ @restricted_channels_by_letter = []
19
+
20
+ (@length / 4).times do
21
+ channel = @file.read_int
22
+ @restricted_channels << channel
23
+ @restricted_channels_by_letter << MODES[@layer.header.mode_name][channel]
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,22 @@
1
+ require 'psd/layer_info'
2
+
3
+ class PSD
4
+ class Knockout < LayerInfo
5
+ def self.should_parse?(key)
6
+ key == 'knko'
7
+ end
8
+
9
+ MODES = [:shallow, :deep]
10
+
11
+ attr_reader :enabled, :mode
12
+
13
+ def parse
14
+ val = @file.read_byte
15
+
16
+ @enabled = val > 0
17
+ @mode = MODES[val - 1]
18
+
19
+ @file.seek 3, IO::SEEK_CUR
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,16 @@
1
+ require 'psd/layer_info'
2
+
3
+ class PSD
4
+ class LayerMaskAsGlobalMask < LayerInfo
5
+ def self.should_parse?(key)
6
+ key == 'lmgm'
7
+ end
8
+
9
+ attr_reader :enabled
10
+
11
+ def parse
12
+ @enabled = @file.read_boolean
13
+ @file.seek 3, IO::SEEK_CUR
14
+ end
15
+ end
16
+ end
@@ -34,4 +34,4 @@ class PSD
34
34
  @data[:layer_comp] = Descriptor.new(@file).parse
35
35
  end
36
36
  end
37
- end
37
+ end
@@ -0,0 +1,16 @@
1
+ require 'psd/layer_info'
2
+
3
+ class PSD
4
+ class TransparencyShapesLayer < LayerInfo
5
+ def self.should_parse?(key)
6
+ key == 'tsly'
7
+ end
8
+
9
+ attr_reader :enabled
10
+
11
+ def parse
12
+ @enabled = @file.read_byte == 1
13
+ @file.seek 3, IO::SEEK_CUR
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require 'psd/layer_info'
2
+
3
+ class PSD
4
+ class VectorMaskAsGlobalMask < LayerInfo
5
+ def self.should_parse?(key)
6
+ key == 'vmgm'
7
+ end
8
+
9
+ attr_reader :enabled
10
+
11
+ def parse
12
+ @enabled = @file.read_boolean
13
+ @file.seek 3, IO::SEEK_CUR
14
+ end
15
+ end
16
+ end
@@ -15,6 +15,8 @@ class PSD
15
15
  @left = 0
16
16
  @bottom = 0
17
17
  @right = 0
18
+ @default_color = 0
19
+ @flags = 0
18
20
  end
19
21
 
20
22
  def parse
@@ -1,3 +1,3 @@
1
1
  class PSD
2
- VERSION = "3.5.0"
2
+ VERSION = "3.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: psd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan LeFevre
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-22 00:00:00.000000000 Z
12
+ date: 2016-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -168,6 +168,7 @@ files:
168
168
  - lib/psd/layer/info/blend_clipping_elements.rb
169
169
  - lib/psd/layer/info/blend_interior_elements.rb
170
170
  - lib/psd/layer/info/brightness_contrast.rb
171
+ - lib/psd/layer/info/channel_blending_restrictions.rb
171
172
  - lib/psd/layer/info/channel_mixer.rb
172
173
  - lib/psd/layer/info/color_balance.rb
173
174
  - lib/psd/layer/info/color_lookup.rb
@@ -179,8 +180,10 @@ files:
179
180
  - lib/psd/layer/info/gradient_map.rb
180
181
  - lib/psd/layer/info/hue_saturation.rb
181
182
  - lib/psd/layer/info/invert.rb
183
+ - lib/psd/layer/info/knockout.rb
182
184
  - lib/psd/layer/info/layer_group.rb
183
185
  - lib/psd/layer/info/layer_id.rb
186
+ - lib/psd/layer/info/layer_mask_as_global_mask.rb
184
187
  - lib/psd/layer/info/layer_name_source.rb
185
188
  - lib/psd/layer/info/layer_section_divider.rb
186
189
  - lib/psd/layer/info/legacy_typetool.rb
@@ -198,9 +201,11 @@ files:
198
201
  - lib/psd/layer/info/sheet_color.rb
199
202
  - lib/psd/layer/info/solid_color.rb
200
203
  - lib/psd/layer/info/threshold.rb
204
+ - lib/psd/layer/info/transparency_shapes_layer.rb
201
205
  - lib/psd/layer/info/typetool.rb
202
206
  - lib/psd/layer/info/unicode_name.rb
203
207
  - lib/psd/layer/info/vector_mask.rb
208
+ - lib/psd/layer/info/vector_mask_as_global_mask.rb
204
209
  - lib/psd/layer/info/vector_origination.rb
205
210
  - lib/psd/layer/info/vector_stroke.rb
206
211
  - lib/psd/layer/info/vector_stroke_content.rb
@@ -294,7 +299,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
299
  version: '0'
295
300
  requirements: []
296
301
  rubyforge_project:
297
- rubygems_version: 2.4.6
302
+ rubygems_version: 2.5.1
298
303
  signing_key:
299
304
  specification_version: 4
300
305
  summary: General purpose library for parsing Photoshop files