image_filter_dsl 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/image_filter_dsl/dsl/filter_instructions.rb +13 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67f93be80e1577e45689f72da3e54d72a2e14d0b052cd9ef0561a4e39e9ad633
|
4
|
+
data.tar.gz: 6399fa0b23c67ae545cae07cd41205b32f26c5c633f2334dab11bc322f0a5940
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34670b0d10d4d235173f65aefbeed30104dff837dd6b6aea97c32a4e67571d125258ef33ccf5c412a2bf1e094c4be34deae189113fc425ecdde2d6e5ca7f4589
|
7
|
+
data.tar.gz: 8269e9517cfca45728e9ce2a8bef89ef9edb1c41a62c94edf5992fb1e2e092082c9f7987eed522942d8cd9993a30fead442693c89ed3b22361d1189548dec1c4
|
data/README.md
CHANGED
@@ -43,15 +43,23 @@ processor = ImageFilterDsl.image_processor(swizzle)
|
|
43
43
|
processor.process_image('./my_source.png', './my_output.png')
|
44
44
|
```
|
45
45
|
|
46
|
+
- See {file:docs/dsl.md}
|
46
47
|
- See `./sample_filters/samples.rb`
|
47
48
|
- See Also: [image_filter_dsl_samples](https://bitbucket.org/WadeH/image_filter_dsl_samples/src/master/) for samples
|
48
49
|
|
49
50
|
## Gem
|
50
51
|
|
51
52
|
Either
|
53
|
+
|
52
54
|
- Build into a gem using included `gemspec` file; includes CLI functionality
|
53
55
|
- Install using gem with `gem install image_filter_dsl`
|
54
56
|
|
57
|
+
## CLI
|
58
|
+
|
59
|
+
Image Filter DSL can be made to process an image from a binary kernal using
|
60
|
+
its CLI tool, `image_filter_dsl`
|
61
|
+
|
62
|
+
- Usage: `image_filter_dsl <kernel_file> <image_in> <image_out>`
|
55
63
|
|
56
64
|
## License
|
57
65
|
|
@@ -31,7 +31,9 @@ module ImageFilterDsl
|
|
31
31
|
round: 0xd6,
|
32
32
|
switch: 0xd7,
|
33
33
|
eq: 0xd8,
|
34
|
-
bnot: 0xd9
|
34
|
+
bnot: 0xd9,
|
35
|
+
# generation
|
36
|
+
rand: 0xe0
|
35
37
|
}
|
36
38
|
|
37
39
|
##
|
@@ -220,6 +222,16 @@ module ImageFilterDsl
|
|
220
222
|
1
|
221
223
|
end
|
222
224
|
end
|
225
|
+
|
226
|
+
##
|
227
|
+
# Random number instruction
|
228
|
+
# @param [Array] i input values (min, max)
|
229
|
+
# @return [Float] Random number between min and max
|
230
|
+
def self.rand(i)
|
231
|
+
r=Random.new
|
232
|
+
min,max = i
|
233
|
+
(-min) + (r.rand * (max + min))
|
234
|
+
end
|
223
235
|
end
|
224
236
|
end
|
225
237
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: image_filter_dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wade H.
|
@@ -111,8 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
|
-
|
115
|
-
rubygems_version: 2.7.8
|
114
|
+
rubygems_version: 3.0.1
|
116
115
|
signing_key:
|
117
116
|
specification_version: 4
|
118
117
|
summary: Image Filter DSL
|