shattered_machine 0.0.9 → 0.1.0
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/CHANGELOG +10 -0
- data/README.md +18 -0
- data/doc/ShatteredMachine.html +5 -7
- data/doc/ShatteredMachine/Brush.html +2 -2
- data/doc/ShatteredMachine/ChangeByte.html +1 -1
- data/doc/ShatteredMachine/Converter.html +2 -2
- data/doc/ShatteredMachine/Defect.html +1 -1
- data/doc/ShatteredMachine/Exchange.html +1 -1
- data/doc/ShatteredMachine/Glitcher.html +13 -13
- data/doc/ShatteredMachine/Io.html +23 -44
- data/doc/ShatteredMachine/Io/Paths.html +1 -187
- data/doc/ShatteredMachine/PixelSorter.html +2 -2
- data/doc/ShatteredMachine/ProgressivePixelSorter.html +318 -0
- data/doc/ShatteredMachine/Sampler.html +14 -29
- data/doc/ShatteredMachine/Slim.html +3 -3
- data/doc/ShatteredMachine/Transpose.html +1 -1
- data/doc/ShatteredMachine/WrongFilter.html +1 -1
- data/doc/_index.html +5 -13
- data/doc/class_list.html +1 -1
- data/doc/index.html +50 -17
- data/doc/method_list.html +48 -48
- data/doc/top-level-namespace.html +1 -1
- data/lib/shattered_machine.rb +2 -1
- data/lib/shattered_machine/progressive_pixel_sorter.rb +66 -0
- data/lib/shattered_machine/sampler.rb +4 -5
- data/lib/shattered_machine/slim.rb +4 -2
- data/shattered_machine.gemspec +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed2afd0e7f7c57bbbb76fda1e60e4a3ec2b915c6eb2e2c8423ca11c202674359
|
4
|
+
data.tar.gz: a7d25800cda40076665ee2150669747e0c344112ac0837658ffa3e25ca4a2a17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c7cfe94d08de41eb0fd015ab7eb522a398dae88bbc1992a8991006c60e6306eb3f26932c35483356bd136f88d33ea5574e35f20bee9a587fa25833441b2502a
|
7
|
+
data.tar.gz: 10bbf56402c646139be2c5b96762281d7a1737c296e82d9f1e6f4994cc9beb468a0321e526d28063442bdc5e6029f19bdfddbae2739c47496634966877badaac
|
data/CHANGELOG
CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.1.0] - 2021-08-06
|
8
|
+
### Added
|
9
|
+
- Progressive pixel sorting
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
- Sampler output filename attribute
|
13
|
+
|
14
|
+
### Added
|
15
|
+
- Slim direction now support vertical, vertical_inverted, horizontal and horizontal_inverted
|
16
|
+
|
7
17
|
## [0.0.9] - 2021-08-06
|
8
18
|
### Fixed
|
9
19
|
- Pixel sorted sort by attribute
|
data/README.md
CHANGED
@@ -4,6 +4,7 @@ The Shattered Machine is a gem that aim to create glitched png images easily.
|
|
4
4
|
|
5
5
|
* [Rubygems page](https://rubygems.org/gems/shattered_machine)
|
6
6
|
* [Documentation](https://www.rubydoc.info/gems/shattered_machine)
|
7
|
+
|
7
8
|
## Features
|
8
9
|
|
9
10
|
- Converter : Convert a single jpg images or a directory full of jpg image into png
|
@@ -12,34 +13,42 @@ The Shattered Machine is a gem that aim to create glitched png images easily.
|
|
12
13
|
- Folder glitching : Glitch easily all png images contained in a folder
|
13
14
|
|
14
15
|
## Usage/Examples
|
16
|
+
|
15
17
|
### Glitcher
|
16
18
|
|
17
19
|
```ruby
|
20
|
+
|
18
21
|
require 'shattered_machine'
|
19
22
|
|
20
23
|
io = ShatteredMachine::Io.new('input_image.png', 'output_folder', 'output_filename')
|
21
24
|
ShatteredMachine::Glitcher.new('Slim', io).call
|
25
|
+
|
22
26
|
```
|
23
27
|
|
24
28
|
### Sampler
|
25
29
|
|
26
30
|
```ruby
|
31
|
+
|
27
32
|
require 'shattered_machine'
|
28
33
|
|
29
34
|
io = ShatteredMachine::Io.new('input_image.png', 'output_folder', 'output_filename')
|
30
35
|
ShatteredMachine::Sampler.new(io).call
|
36
|
+
|
31
37
|
```
|
32
38
|
|
33
39
|
### Converter
|
34
40
|
|
35
41
|
```ruby
|
42
|
+
|
36
43
|
require 'shattered_machine'
|
37
44
|
|
38
45
|
io = ShatteredMachine::Io.new('input_image.jpg', 'output_folder', 'output_filename')
|
39
46
|
ShatteredMachine::Converter.new(io).call
|
47
|
+
|
40
48
|
```
|
41
49
|
|
42
50
|
## Development
|
51
|
+
|
43
52
|
### Install locally
|
44
53
|
|
45
54
|
The Shattered Machine using two main libraries for glitching :
|
@@ -51,6 +60,15 @@ To install the needed dependencies you need to install the [Ruby language](https
|
|
51
60
|
|
52
61
|
Then run `bundle install` to fetch the needed gems.
|
53
62
|
|
63
|
+
### Create new version
|
64
|
+
|
65
|
+
- Fill the CHANGELOG with the changes contained in the new version
|
66
|
+
- Ensure the specs are green
|
67
|
+
- Change the versions in `lib/shattered_machine.rb` and `shattered_machine.gemspec`
|
68
|
+
- Create git tag
|
69
|
+
- Compile the gem : `gem build shattered_machine.gemspec`
|
70
|
+
- Push the new version : `gem push shattered_machine-x.x.x.gem`
|
71
|
+
|
54
72
|
### Specs
|
55
73
|
|
56
74
|
This project uses [Rspec](https://rspec.info/) for writting specs, to run them simply run `bundle rspec`
|
data/doc/ShatteredMachine.html
CHANGED
@@ -79,7 +79,7 @@
|
|
79
79
|
<dl>
|
80
80
|
<dt>Defined in:</dt>
|
81
81
|
<dd>lib/shattered_machine.rb<span class="defines">,<br />
|
82
|
-
lib/shattered_machine/io.rb,<br /> lib/shattered_machine/slim.rb,<br /> lib/shattered_machine/brush.rb,<br /> lib/shattered_machine/defect.rb,<br /> lib/
|
82
|
+
lib/shattered_machine/io.rb,<br /> lib/shattered_machine/slim.rb,<br /> lib/shattered_machine/brush.rb,<br /> lib/shattered_machine/defect.rb,<br /> lib/shattered_machine/sampler.rb,<br /> lib/shattered_machine/exchange.rb,<br /> lib/shattered_machine/glitcher.rb,<br /> lib/shattered_machine/converter.rb,<br /> lib/shattered_machine/transpose.rb,<br /> lib/shattered_machine/change_byte.rb,<br /> lib/shattered_machine/pixel_sorter.rb,<br /> lib/shattered_machine/wrong_filter.rb,<br /> lib/shattered_machine/progressive_pixel_sorter.rb</span>
|
83
83
|
</dd>
|
84
84
|
</dl>
|
85
85
|
|
@@ -100,11 +100,9 @@
|
|
100
100
|
<p class="children">
|
101
101
|
|
102
102
|
|
103
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="ShatteredMachine/RustyEngine.html" title="ShatteredMachine::RustyEngine (module)">RustyEngine</a></span>
|
104
|
-
|
105
103
|
|
106
104
|
|
107
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="ShatteredMachine/Brush.html" title="ShatteredMachine::Brush (class)">Brush</a></span>, <span class='object_link'><a href="ShatteredMachine/ChangeByte.html" title="ShatteredMachine::ChangeByte (class)">ChangeByte</a></span>, <span class='object_link'><a href="ShatteredMachine/Converter.html" title="ShatteredMachine::Converter (class)">Converter</a></span>, <span class='object_link'><a href="ShatteredMachine/Defect.html" title="ShatteredMachine::Defect (class)">Defect</a></span>, <span class='object_link'><a href="ShatteredMachine/Exchange.html" title="ShatteredMachine::Exchange (class)">Exchange</a></span>, <span class='object_link'><a href="ShatteredMachine/Glitcher.html" title="ShatteredMachine::Glitcher (class)">Glitcher</a></span>, <span class='object_link'><a href="ShatteredMachine/Io.html" title="ShatteredMachine::Io (class)">Io</a></span>, <span class='object_link'><a href="ShatteredMachine/PixelSorter.html" title="ShatteredMachine::PixelSorter (class)">PixelSorter</a></span>, <span class='object_link'><a href="ShatteredMachine/Sampler.html" title="ShatteredMachine::Sampler (class)">Sampler</a></span>, <span class='object_link'><a href="ShatteredMachine/Slim.html" title="ShatteredMachine::Slim (class)">Slim</a></span>, <span class='object_link'><a href="ShatteredMachine/Transpose.html" title="ShatteredMachine::Transpose (class)">Transpose</a></span>, <span class='object_link'><a href="ShatteredMachine/WrongFilter.html" title="ShatteredMachine::WrongFilter (class)">WrongFilter</a></span>
|
105
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="ShatteredMachine/Brush.html" title="ShatteredMachine::Brush (class)">Brush</a></span>, <span class='object_link'><a href="ShatteredMachine/ChangeByte.html" title="ShatteredMachine::ChangeByte (class)">ChangeByte</a></span>, <span class='object_link'><a href="ShatteredMachine/Converter.html" title="ShatteredMachine::Converter (class)">Converter</a></span>, <span class='object_link'><a href="ShatteredMachine/Defect.html" title="ShatteredMachine::Defect (class)">Defect</a></span>, <span class='object_link'><a href="ShatteredMachine/Exchange.html" title="ShatteredMachine::Exchange (class)">Exchange</a></span>, <span class='object_link'><a href="ShatteredMachine/Glitcher.html" title="ShatteredMachine::Glitcher (class)">Glitcher</a></span>, <span class='object_link'><a href="ShatteredMachine/Io.html" title="ShatteredMachine::Io (class)">Io</a></span>, <span class='object_link'><a href="ShatteredMachine/PixelSorter.html" title="ShatteredMachine::PixelSorter (class)">PixelSorter</a></span>, <span class='object_link'><a href="ShatteredMachine/ProgressivePixelSorter.html" title="ShatteredMachine::ProgressivePixelSorter (class)">ProgressivePixelSorter</a></span>, <span class='object_link'><a href="ShatteredMachine/Sampler.html" title="ShatteredMachine::Sampler (class)">Sampler</a></span>, <span class='object_link'><a href="ShatteredMachine/Slim.html" title="ShatteredMachine::Slim (class)">Slim</a></span>, <span class='object_link'><a href="ShatteredMachine/Transpose.html" title="ShatteredMachine::Transpose (class)">Transpose</a></span>, <span class='object_link'><a href="ShatteredMachine/WrongFilter.html" title="ShatteredMachine::WrongFilter (class)">WrongFilter</a></span>
|
108
106
|
|
109
107
|
|
110
108
|
</p>
|
@@ -120,7 +118,7 @@
|
|
120
118
|
<dt id="VERSION-constant" class="">VERSION =
|
121
119
|
|
122
120
|
</dt>
|
123
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.0
|
121
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>'</span></span></pre></dd>
|
124
122
|
|
125
123
|
</dl>
|
126
124
|
|
@@ -136,11 +134,11 @@
|
|
136
134
|
</div>
|
137
135
|
|
138
136
|
<div id="footer">
|
139
|
-
Generated on
|
137
|
+
Generated on Fri Aug 6 17:15:03 2021 by
|
140
138
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
141
139
|
0.9.26 (ruby-2.6.6).
|
142
140
|
</div>
|
143
141
|
|
144
142
|
</div>
|
145
143
|
</body>
|
146
|
-
</html>
|
144
|
+
</html>
|
@@ -352,7 +352,7 @@
|
|
352
352
|
<span class='id identifier rubyid_ruby_to_rust_directions'>ruby_to_rust_directions</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>horizontal:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>vertical:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>2</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
353
353
|
<span class='label'>horizontal_inverted:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>3</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
354
354
|
<span class='label'>vertical_inverted:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>4</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
355
|
-
<span class='const'
|
355
|
+
<span class='const'>RustyEngine</span><span class='period'>.</span><span class='id identifier rubyid_brush'>brush</span><span class='lparen'>(</span><span class='id identifier rubyid_input_image'>input_image</span><span class='comma'>,</span> <span class='id identifier rubyid_output_image'>output_image</span><span class='comma'>,</span> <span class='ivar'>@probability</span><span class='comma'>,</span> <span class='ivar'>@min_pixels</span><span class='comma'>,</span>
|
356
356
|
<span class='ivar'>@max_pixels</span><span class='comma'>,</span> <span class='id identifier rubyid_ruby_to_rust_directions'>ruby_to_rust_directions</span><span class='lbracket'>[</span><span class='ivar'>@direction</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
357
357
|
<span class='kw'>end</span></pre>
|
358
358
|
</td>
|
@@ -365,7 +365,7 @@
|
|
365
365
|
</div>
|
366
366
|
|
367
367
|
<div id="footer">
|
368
|
-
Generated on
|
368
|
+
Generated on Fri Aug 6 17:15:03 2021 by
|
369
369
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
370
370
|
0.9.26 (ruby-2.6.6).
|
371
371
|
</div>
|
@@ -357,7 +357,7 @@
|
|
357
357
|
</div>
|
358
358
|
|
359
359
|
<div id="footer">
|
360
|
-
Generated on
|
360
|
+
Generated on Fri Aug 6 17:15:03 2021 by
|
361
361
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
362
362
|
0.9.26 (ruby-2.6.6).
|
363
363
|
</div>
|
@@ -304,7 +304,7 @@
|
|
304
304
|
|
305
305
|
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
|
306
306
|
<span class='ivar'>@io</span><span class='period'>.</span><span class='id identifier rubyid_jpg_images'>jpg_images</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_jpg'>jpg</span><span class='op'>|</span>
|
307
|
-
<span class='const'
|
307
|
+
<span class='const'>RustyEngine</span><span class='period'>.</span><span class='id identifier rubyid_convert'>convert</span><span class='lparen'>(</span><span class='id identifier rubyid_jpg'>jpg</span><span class='period'>.</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_jpg'>jpg</span><span class='period'>.</span><span class='id identifier rubyid_output'>output</span><span class='rparen'>)</span>
|
308
308
|
<span class='kw'>end</span>
|
309
309
|
<span class='kw'>end</span></pre>
|
310
310
|
</td>
|
@@ -317,7 +317,7 @@
|
|
317
317
|
</div>
|
318
318
|
|
319
319
|
<div id="footer">
|
320
|
-
Generated on
|
320
|
+
Generated on Fri Aug 6 17:15:03 2021 by
|
321
321
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
322
322
|
0.9.26 (ruby-2.6.6).
|
323
323
|
</div>
|
@@ -359,7 +359,7 @@
|
|
359
359
|
</div>
|
360
360
|
|
361
361
|
<div id="footer">
|
362
|
-
Generated on
|
362
|
+
Generated on Fri Aug 6 17:15:03 2021 by
|
363
363
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
364
364
|
0.9.26 (ruby-2.6.6).
|
365
365
|
</div>
|
@@ -379,7 +379,7 @@
|
|
379
379
|
</div>
|
380
380
|
|
381
381
|
<div id="footer">
|
382
|
-
Generated on
|
382
|
+
Generated on Fri Aug 6 17:15:03 2021 by
|
383
383
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
384
384
|
0.9.26 (ruby-2.6.6).
|
385
385
|
</div>
|
@@ -261,14 +261,14 @@
|
|
261
261
|
<pre class="lines">
|
262
262
|
|
263
263
|
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
264
|
+
17
|
265
|
+
18
|
266
|
+
19
|
267
|
+
20
|
268
|
+
21</pre>
|
269
269
|
</td>
|
270
270
|
<td>
|
271
|
-
<pre class="code"><span class="info file"># File 'lib/shattered_machine/glitcher.rb', line
|
271
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/glitcher.rb', line 17</span>
|
272
272
|
|
273
273
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_glitch_library'>glitch_library</span><span class='comma'>,</span> <span class='id identifier rubyid_io'>io</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
274
274
|
<span class='ivar'>@glitch_library</span> <span class='op'>=</span> <span class='id identifier rubyid_glitch_library'>glitch_library</span>
|
@@ -331,14 +331,14 @@
|
|
331
331
|
<pre class="lines">
|
332
332
|
|
333
333
|
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
334
|
+
24
|
335
|
+
25
|
336
|
+
26
|
337
|
+
27
|
338
|
+
28</pre>
|
339
339
|
</td>
|
340
340
|
<td>
|
341
|
-
<pre class="code"><span class="info file"># File 'lib/shattered_machine/glitcher.rb', line
|
341
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/glitcher.rb', line 24</span>
|
342
342
|
|
343
343
|
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
|
344
344
|
<span class='ivar'>@io</span><span class='period'>.</span><span class='id identifier rubyid_png_images'>png_images</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span>
|
@@ -355,7 +355,7 @@
|
|
355
355
|
</div>
|
356
356
|
|
357
357
|
<div id="footer">
|
358
|
-
Generated on
|
358
|
+
Generated on Fri Aug 6 17:15:03 2021 by
|
359
359
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
360
360
|
0.9.26 (ruby-2.6.6).
|
361
361
|
</div>
|
@@ -121,27 +121,6 @@
|
|
121
121
|
|
122
122
|
</p>
|
123
123
|
|
124
|
-
|
125
|
-
<h2>
|
126
|
-
Constant Summary
|
127
|
-
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
128
|
-
</h2>
|
129
|
-
|
130
|
-
<dl class="constants">
|
131
|
-
|
132
|
-
<dt id="PNG_EXTENSIONS-constant" class="">PNG_EXTENSIONS =
|
133
|
-
|
134
|
-
</dt>
|
135
|
-
<dd><pre class="code"><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.png</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.PNG</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
136
|
-
|
137
|
-
<dt id="JPG_EXTENSIONS-constant" class="">JPG_EXTENSIONS =
|
138
|
-
|
139
|
-
</dt>
|
140
|
-
<dd><pre class="code"><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.jpg</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.jpeg</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.JPG</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.JPEG</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
141
|
-
|
142
|
-
</dl>
|
143
|
-
|
144
|
-
|
145
124
|
|
146
125
|
|
147
126
|
|
@@ -346,14 +325,14 @@
|
|
346
325
|
<pre class="lines">
|
347
326
|
|
348
327
|
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
328
|
+
12
|
329
|
+
13
|
330
|
+
14
|
331
|
+
15
|
332
|
+
16</pre>
|
354
333
|
</td>
|
355
334
|
<td>
|
356
|
-
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line
|
335
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line 12</span>
|
357
336
|
|
358
337
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_input_path'>input_path</span><span class='comma'>,</span> <span class='id identifier rubyid_output_folder'>output_folder</span><span class='comma'>,</span> <span class='id identifier rubyid_output_filename'>output_filename</span><span class='rparen'>)</span>
|
359
338
|
<span class='ivar'>@input_path</span> <span class='op'>=</span> <span class='id identifier rubyid_input_path'>input_path</span>
|
@@ -464,21 +443,21 @@
|
|
464
443
|
<pre class="lines">
|
465
444
|
|
466
445
|
|
446
|
+
28
|
447
|
+
29
|
448
|
+
30
|
449
|
+
31
|
467
450
|
32
|
468
451
|
33
|
469
|
-
34
|
470
|
-
35
|
471
|
-
36
|
472
|
-
37
|
473
|
-
38</pre>
|
452
|
+
34</pre>
|
474
453
|
</td>
|
475
454
|
<td>
|
476
|
-
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line
|
455
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line 28</span>
|
477
456
|
|
478
457
|
<span class='kw'>def</span> <span class='id identifier rubyid_jpg_images'>jpg_images</span>
|
479
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_single_image_io'>single_image_io</span> <span class='kw'>if</span> <span class='id identifier rubyid_extension_included?'>extension_included?</span><span class='lparen'>(</span><span class='const'
|
458
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_single_image_io'>single_image_io</span> <span class='kw'>if</span> <span class='id identifier rubyid_extension_included?'>extension_included?</span><span class='lparen'>(</span><span class='const'>JPG_EXTENSIONS</span><span class='comma'>,</span> <span class='ivar'>@input_path</span><span class='rparen'>)</span>
|
480
459
|
|
481
|
-
<span class='id identifier rubyid_images_in_directory'>images_in_directory</span><span class='lparen'>(</span><span class='const'
|
460
|
+
<span class='id identifier rubyid_images_in_directory'>images_in_directory</span><span class='lparen'>(</span><span class='const'>JPG_EXTENSIONS</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_img'>img</span><span class='op'>|</span>
|
482
461
|
<span class='const'><span class='object_link'><a href="Io/Paths.html" title="ShatteredMachine::Io::Paths (class)">Paths</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="ShatteredMachine::Io#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@input_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_img'>img</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_generate_output_filename'>generate_output_filename</span><span class='lparen'>(</span><span class='id identifier rubyid_img'>img</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
483
462
|
<span class='kw'>end</span>
|
484
463
|
<span class='kw'>end</span></pre>
|
@@ -531,21 +510,21 @@
|
|
531
510
|
<pre class="lines">
|
532
511
|
|
533
512
|
|
513
|
+
19
|
514
|
+
20
|
515
|
+
21
|
516
|
+
22
|
534
517
|
23
|
535
518
|
24
|
536
|
-
25
|
537
|
-
26
|
538
|
-
27
|
539
|
-
28
|
540
|
-
29</pre>
|
519
|
+
25</pre>
|
541
520
|
</td>
|
542
521
|
<td>
|
543
|
-
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line
|
522
|
+
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line 19</span>
|
544
523
|
|
545
524
|
<span class='kw'>def</span> <span class='id identifier rubyid_png_images'>png_images</span>
|
546
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_single_image_io'>single_image_io</span> <span class='kw'>if</span> <span class='id identifier rubyid_extension_included?'>extension_included?</span><span class='lparen'>(</span><span class='const'
|
525
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_single_image_io'>single_image_io</span> <span class='kw'>if</span> <span class='id identifier rubyid_extension_included?'>extension_included?</span><span class='lparen'>(</span><span class='const'>PNG_EXTENSIONS</span><span class='comma'>,</span> <span class='ivar'>@input_path</span><span class='rparen'>)</span>
|
547
526
|
|
548
|
-
<span class='id identifier rubyid_images_in_directory'>images_in_directory</span><span class='lparen'>(</span><span class='const'
|
527
|
+
<span class='id identifier rubyid_images_in_directory'>images_in_directory</span><span class='lparen'>(</span><span class='const'>PNG_EXTENSIONS</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_img'>img</span><span class='op'>|</span>
|
549
528
|
<span class='const'><span class='object_link'><a href="Io/Paths.html" title="ShatteredMachine::Io::Paths (class)">Paths</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="ShatteredMachine::Io#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@input_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_img'>img</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_generate_output_filename'>generate_output_filename</span><span class='lparen'>(</span><span class='id identifier rubyid_img'>img</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
550
529
|
<span class='kw'>end</span>
|
551
530
|
<span class='kw'>end</span></pre>
|
@@ -559,7 +538,7 @@
|
|
559
538
|
</div>
|
560
539
|
|
561
540
|
<div id="footer">
|
562
|
-
Generated on
|
541
|
+
Generated on Fri Aug 6 17:15:03 2021 by
|
563
542
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
564
543
|
0.9.26 (ruby-2.6.6).
|
565
544
|
</div>
|
@@ -105,202 +105,16 @@
|
|
105
105
|
|
106
106
|
|
107
107
|
|
108
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
109
|
-
<ul class="summary">
|
110
|
-
|
111
|
-
<li class="public ">
|
112
|
-
<span class="summary_signature">
|
113
|
-
|
114
|
-
<a href="#input-instance_method" title="#input (instance method)">#<strong>input</strong> ⇒ Object </a>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
</span>
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
<span class="summary_desc"><div class='inline'>
|
132
|
-
<p>Returns the value of attribute input.</p>
|
133
|
-
</div></span>
|
134
|
-
|
135
|
-
</li>
|
136
|
-
|
137
|
-
|
138
|
-
<li class="public ">
|
139
|
-
<span class="summary_signature">
|
140
|
-
|
141
|
-
<a href="#output-instance_method" title="#output (instance method)">#<strong>output</strong> ⇒ Object </a>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
</span>
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
<span class="summary_desc"><div class='inline'>
|
159
|
-
<p>Returns the value of attribute output.</p>
|
160
|
-
</div></span>
|
161
|
-
|
162
|
-
</li>
|
163
|
-
|
164
|
-
|
165
|
-
</ul>
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
<div id="instance_attr_details" class="attr_details">
|
173
|
-
<h2>Instance Attribute Details</h2>
|
174
|
-
|
175
|
-
|
176
|
-
<span id="input=-instance_method"></span>
|
177
|
-
<div class="method_details first">
|
178
|
-
<h3 class="signature first" id="input-instance_method">
|
179
|
-
|
180
|
-
#<strong>input</strong> ⇒ <tt>Object</tt>
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
</h3><div class="docstring">
|
187
|
-
<div class="discussion">
|
188
|
-
|
189
|
-
<p>Returns the value of attribute input</p>
|
190
108
|
|
191
109
|
|
192
|
-
</div>
|
193
|
-
</div>
|
194
|
-
<div class="tags">
|
195
|
-
|
196
|
-
<p class="tag_title">Returns:</p>
|
197
|
-
<ul class="return">
|
198
|
-
|
199
|
-
<li>
|
200
|
-
|
201
|
-
|
202
|
-
<span class='type'>(<tt>Object</tt>)</span>
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
—
|
207
|
-
<div class='inline'>
|
208
|
-
<p>the current value of input</p>
|
209
|
-
</div>
|
210
|
-
|
211
|
-
</li>
|
212
|
-
|
213
|
-
</ul>
|
214
|
-
|
215
|
-
</div><table class="source_code">
|
216
|
-
<tr>
|
217
|
-
<td>
|
218
|
-
<pre class="lines">
|
219
|
-
|
220
|
-
|
221
|
-
11
|
222
|
-
12
|
223
|
-
13</pre>
|
224
|
-
</td>
|
225
|
-
<td>
|
226
|
-
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line 11</span>
|
227
|
-
|
228
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_input'>input</span>
|
229
|
-
<span class='ivar'>@input</span>
|
230
|
-
<span class='kw'>end</span></pre>
|
231
|
-
</td>
|
232
|
-
</tr>
|
233
|
-
</table>
|
234
|
-
</div>
|
235
|
-
|
236
|
-
|
237
|
-
<span id="output=-instance_method"></span>
|
238
|
-
<div class="method_details ">
|
239
|
-
<h3 class="signature " id="output-instance_method">
|
240
|
-
|
241
|
-
#<strong>output</strong> ⇒ <tt>Object</tt>
|
242
|
-
|
243
110
|
|
244
|
-
|
245
111
|
|
246
112
|
|
247
|
-
</h3><div class="docstring">
|
248
|
-
<div class="discussion">
|
249
|
-
|
250
|
-
<p>Returns the value of attribute output</p>
|
251
|
-
|
252
|
-
|
253
|
-
</div>
|
254
|
-
</div>
|
255
|
-
<div class="tags">
|
256
|
-
|
257
|
-
<p class="tag_title">Returns:</p>
|
258
|
-
<ul class="return">
|
259
|
-
|
260
|
-
<li>
|
261
|
-
|
262
|
-
|
263
|
-
<span class='type'>(<tt>Object</tt>)</span>
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
—
|
268
|
-
<div class='inline'>
|
269
|
-
<p>the current value of output</p>
|
270
|
-
</div>
|
271
|
-
|
272
|
-
</li>
|
273
|
-
|
274
|
-
</ul>
|
275
|
-
|
276
|
-
</div><table class="source_code">
|
277
|
-
<tr>
|
278
|
-
<td>
|
279
|
-
<pre class="lines">
|
280
|
-
|
281
|
-
|
282
|
-
11
|
283
|
-
12
|
284
|
-
13</pre>
|
285
|
-
</td>
|
286
|
-
<td>
|
287
|
-
<pre class="code"><span class="info file"># File 'lib/shattered_machine/io.rb', line 11</span>
|
288
|
-
|
289
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_output'>output</span>
|
290
|
-
<span class='ivar'>@output</span>
|
291
|
-
<span class='kw'>end</span></pre>
|
292
|
-
</td>
|
293
|
-
</tr>
|
294
|
-
</table>
|
295
|
-
</div>
|
296
|
-
|
297
|
-
</div>
|
298
|
-
|
299
113
|
|
300
114
|
</div>
|
301
115
|
|
302
116
|
<div id="footer">
|
303
|
-
Generated on
|
117
|
+
Generated on Fri Aug 6 17:15:03 2021 by
|
304
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
305
119
|
0.9.26 (ruby-2.6.6).
|
306
120
|
</div>
|