psd 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/psd/renderer/mask.rb +2 -1
- data/lib/psd/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62a564e222daa1c918ef3bdf9c2a4f99dfd59833
|
4
|
+
data.tar.gz: 93c28d4cba1c961cb28734da81f54e1617adcbdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eb251154704e8172420d3aa1d97851f739f516dcda1d659349719933f354e7443e3a4cebad498084ccf475505e5f97fef0a16f5cf15b25c4bdc3264401b9c59
|
7
|
+
data.tar.gz: 7b4c1554a65b7f491f197839b2a99fe383e97c6b1f79ee0528374c919e11abbf3d26293c1b27fc11ca11098b64594651d820d4e9a88e192a4ef4182f0d922106
|
data/lib/psd/renderer/mask.rb
CHANGED
@@ -26,10 +26,11 @@ class PSD
|
|
26
26
|
layer_x = doc_x - @layer.left
|
27
27
|
layer_y = doc_y - @layer.top
|
28
28
|
|
29
|
+
next unless @canvas.canvas.include_xy?(layer_x, layer_y)
|
29
30
|
color = ChunkyPNG::Color.to_truecolor_alpha_bytes(@canvas[layer_x, layer_y])
|
30
31
|
|
31
32
|
# We're off the document canvas. Crop.
|
32
|
-
if doc_x < 0 || doc_x
|
33
|
+
if doc_x < 0 || doc_x > @doc_width || doc_y < 0 || doc_y > @doc_height
|
33
34
|
color[3] = 0
|
34
35
|
else
|
35
36
|
color[3] = color[3] * @mask_data[i] / 255
|
data/lib/psd/version.rb
CHANGED