blobsterix 0.0.28 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +2 -0
- data/lib/blobsterix/transformation/image_transformation.rb +16 -12
- data/lib/blobsterix/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a86be4b6c6a05bb3cb28fe815a063dfc7f716502
|
4
|
+
data.tar.gz: ef1dbad154467d89aa9dad092171103c10e1876e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9045c9e592054bc109d4e31e5f8a3fbff6d143fccffa8278f45b6100b3d22f374c57ff2fab8d6879b91d899fb1c38a9c71358faf4880efb8ef94aa1e15535a9
|
7
|
+
data.tar.gz: 136631e508da0e93bed9dcf0b9d9ffb06d005e1dd0834fb2c8f43500a429388651428170122a391aa30d3d495e7a6161c0621d788c4049fb59695b3a74d105ac
|
data/CHANGELOG.txt
CHANGED
@@ -121,17 +121,17 @@ module Blobsterix::Transformations::Impl
|
|
121
121
|
image.write target_path
|
122
122
|
end
|
123
123
|
|
124
|
-
create_simple_trafo("image2HTML", "image/*", "text/html", true) do |input_path, target_path, value|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
end
|
124
|
+
# create_simple_trafo("image2HTML", "image/*", "text/html", true) do |input_path, target_path, value|
|
125
|
+
# type = "image/*"
|
126
|
+
# File.open(input_path) {|file|
|
127
|
+
# type = MimeMagic.by_magic(file).type
|
128
|
+
# }
|
129
|
+
|
130
|
+
# image = type === "image/webp" ? {:width => "unknown", :height => "unknown"} : MiniMagick::Image.open(input_path)
|
131
|
+
# File.open(target_path, "w") {|file|
|
132
|
+
# file.write("<html><body>Mimetype: #{type}<br>Width: #{image[:width]}<br>Height: #{image[:height]}</body></html>")
|
133
|
+
# }
|
134
|
+
# end
|
135
135
|
|
136
136
|
create_simple_trafo("json", "image/*", "text/json", true) do |input_path, target_path, value|
|
137
137
|
type = "image/*"
|
@@ -182,7 +182,11 @@ module Blobsterix::Transformations::Impl
|
|
182
182
|
raise StandardError.new($?) unless system("convert \"#{input_path}\" gif:\"#{target_path}\"")
|
183
183
|
end
|
184
184
|
|
185
|
-
create_simple_trafo("webp", "image
|
185
|
+
create_simple_trafo("webp", "image/png", "image/webp", true) do |input_path, target_path, value|
|
186
|
+
raise StandardError.new($?) unless system("cwebp \"#{input_path}\" -o \"#{target_path}\"")
|
187
|
+
end
|
188
|
+
|
189
|
+
create_simple_trafo("webp", "image/jpeg", "image/webp", true) do |input_path, target_path, value|
|
186
190
|
raise StandardError.new($?) unless system("cwebp \"#{input_path}\" -o \"#{target_path}\"")
|
187
191
|
end
|
188
192
|
|
data/lib/blobsterix/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blobsterix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Sudmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|