avv2word 1.1.17 → 1.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avv2word/document.rb +1 -1
- data/lib/avv2word/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95e387833887863cebe3143db7017ab686644701424caa5b49343c51300ad310
|
4
|
+
data.tar.gz: 7c24d2050e2a38d43347b520262a4a1c8214a84e6e0e3888f7a24285df44b4cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b511db218b1df2be1e85e663c0ddd0479d5bc3b3ad463b096b382adcc285d383688aa37d1ed74388cd7979f8dbba97fe15841caf23bdc6a6c6f4781f265bfb4
|
7
|
+
data.tar.gz: fd00d1831daca0f1a8b1d7fc882b2af026d5c709122c1e5ef3560eb0822f9c591655f67f91a16f73edc37831b8a208ec17caff08578ad3479b57e262fcdcf106
|
data/lib/avv2word/document.rb
CHANGED
@@ -18,7 +18,7 @@ module Avv2word
|
|
18
18
|
mime_type, img_data = img_elm.attributes["src"].value.split(",")
|
19
19
|
# ^--data:image/jpeg;base64
|
20
20
|
img_path = "tmp_imgs/image_#{i}.jpg"
|
21
|
-
File.open(img_path,"
|
21
|
+
File.open(img_path,"wb"){|f| f.write Base64.decode64(img_data)}
|
22
22
|
img_elm.attributes["src"].value = img_path
|
23
23
|
match_dimensions = %x( file #{img_path} ).match(/, (?<x>\d+) ?x ?(?<y>\d+),/)
|
24
24
|
img_elm["style"] = "width:#{match_dimensions[:x].to_i*resize}px;height:#{match_dimensions[:y].to_i*resize}px"
|
data/lib/avv2word/version.rb
CHANGED