shattered_machine 0.0.1

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.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +1 -0
  4. data/.yardoc/checksums +14 -0
  5. data/.yardoc/complete +0 -0
  6. data/.yardoc/object_types +0 -0
  7. data/.yardoc/objects/root.dat +0 -0
  8. data/.yardoc/proxy_types +0 -0
  9. data/Gemfile +8 -0
  10. data/LICENSE +9 -0
  11. data/README.md +51 -0
  12. data/doc/ShatteredMachine.html +135 -0
  13. data/doc/ShatteredMachine/Brush.html +375 -0
  14. data/doc/ShatteredMachine/ChangeByte.html +367 -0
  15. data/doc/ShatteredMachine/Converter.html +327 -0
  16. data/doc/ShatteredMachine/Defect.html +369 -0
  17. data/doc/ShatteredMachine/Exchange.html +373 -0
  18. data/doc/ShatteredMachine/Glitcher.html +365 -0
  19. data/doc/ShatteredMachine/Io.html +569 -0
  20. data/doc/ShatteredMachine/Io/Paths.html +310 -0
  21. data/doc/ShatteredMachine/PixelSorter.html +381 -0
  22. data/doc/ShatteredMachine/RustyEngine.html +111 -0
  23. data/doc/ShatteredMachine/Sampler.html +361 -0
  24. data/doc/ShatteredMachine/Slim.html +389 -0
  25. data/doc/ShatteredMachine/Transpose.html +369 -0
  26. data/doc/ShatteredMachine/WrongFilter.html +367 -0
  27. data/doc/_index.html +288 -0
  28. data/doc/class_list.html +51 -0
  29. data/doc/css/common.css +1 -0
  30. data/doc/css/full_list.css +58 -0
  31. data/doc/css/style.css +497 -0
  32. data/doc/file_list.html +56 -0
  33. data/doc/frames.html +17 -0
  34. data/doc/index.html +123 -0
  35. data/doc/js/app.js +314 -0
  36. data/doc/js/full_list.js +216 -0
  37. data/doc/js/jquery.js +4 -0
  38. data/doc/method_list.html +275 -0
  39. data/doc/top-level-namespace.html +110 -0
  40. data/lib/rusty_engine/librusty_engine.dll +0 -0
  41. data/lib/rusty_engine/librusty_engine.dylib +0 -0
  42. data/lib/rusty_engine/librusty_engine.so +0 -0
  43. data/lib/rusty_engine/rusty_engine.rb +39 -0
  44. data/lib/shattered_machine.rb +11 -0
  45. data/lib/shattered_machine/brush.rb +28 -0
  46. data/lib/shattered_machine/change_byte.rb +41 -0
  47. data/lib/shattered_machine/converter.rb +20 -0
  48. data/lib/shattered_machine/defect.rb +38 -0
  49. data/lib/shattered_machine/exchange.rb +59 -0
  50. data/lib/shattered_machine/glitcher.rb +35 -0
  51. data/lib/shattered_machine/io.rb +74 -0
  52. data/lib/shattered_machine/pixel_sorter.rb +50 -0
  53. data/lib/shattered_machine/sampler.rb +100 -0
  54. data/lib/shattered_machine/slim.rb +55 -0
  55. data/lib/shattered_machine/transpose.rb +50 -0
  56. data/lib/shattered_machine/wrong_filter.rb +39 -0
  57. data/shattered_machine.gemspec +16 -0
  58. data/spec/brush_spec.rb +28 -0
  59. data/spec/change_byte_spec.rb +26 -0
  60. data/spec/converter_spec.rb +24 -0
  61. data/spec/defect_spec.rb +26 -0
  62. data/spec/exchange_spec.rb +26 -0
  63. data/spec/glitcher_spec.rb +26 -0
  64. data/spec/images/bar.PNG +0 -0
  65. data/spec/images/bar.jpeg +0 -0
  66. data/spec/images/foo.jpg +0 -0
  67. data/spec/images/foo.png +0 -0
  68. data/spec/images/fuzz.JPG +0 -0
  69. data/spec/images/pouet.JPEG +0 -0
  70. data/spec/io_spec.rb +74 -0
  71. data/spec/lib/rusty_engine_spec.rb +20 -0
  72. data/spec/pixel_sorter_spec.rb +26 -0
  73. data/spec/sampler_spec.rb +37 -0
  74. data/spec/slim_spec.rb +26 -0
  75. data/spec/spec_helper.rb +61 -0
  76. data/spec/transpose_spec.rb +26 -0
  77. data/spec/wrong_filter_spec.rb +26 -0
  78. metadata +147 -0
@@ -0,0 +1,111 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: ShatteredMachine::RustyEngine
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "ShatteredMachine::RustyEngine";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (R)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../ShatteredMachine.html" title="ShatteredMachine (module)">ShatteredMachine</a></span></span>
41
+ &raquo;
42
+ <span class="title">RustyEngine</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: ShatteredMachine::RustyEngine
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+ <dl>
73
+ <dt>Extended by:</dt>
74
+ <dd>FFI::Library</dd>
75
+ </dl>
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+ <dl>
85
+ <dt>Defined in:</dt>
86
+ <dd>lib/rusty_engine/rusty_engine.rb</dd>
87
+ </dl>
88
+
89
+ </div>
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ </div>
102
+
103
+ <div id="footer">
104
+ Generated on Sun May 23 13:30:10 2021 by
105
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
106
+ 0.9.26 (ruby-2.6.6).
107
+ </div>
108
+
109
+ </div>
110
+ </body>
111
+ </html>
@@ -0,0 +1,361 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: ShatteredMachine::Sampler
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "ShatteredMachine::Sampler";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (S)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../ShatteredMachine.html" title="ShatteredMachine (module)">ShatteredMachine</a></span></span>
41
+ &raquo;
42
+ <span class="title">Sampler</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: ShatteredMachine::Sampler
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">ShatteredMachine::Sampler</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/shattered_machine/sampler.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>A simple weay ro run one, many or all glitch algotirhm on one specific image. This create a quick overview of the effect of each algo for the given image.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+ <h2>
116
+ Constant Summary
117
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
118
+ </h2>
119
+
120
+ <dl class="constants">
121
+
122
+ <dt id="FILTERS-constant" class="">FILTERS =
123
+
124
+ </dt>
125
+ <dd><pre class="code"><span class='qwords_beg'>%w[</span><span class='tstring_content'>none</span><span class='words_sep'> </span><span class='tstring_content'>sub</span><span class='words_sep'> </span><span class='tstring_content'>up</span><span class='words_sep'> </span><span class='tstring_content'>average</span><span class='words_sep'> </span><span class='tstring_content'>paeth</span><span class='tstring_end'>]</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
126
+
127
+ <dt id="SLIM_DIRECTION-constant" class="">SLIM_DIRECTION =
128
+
129
+ </dt>
130
+ <dd><pre class="code"><span class='qwords_beg'>%w[</span><span class='tstring_content'>up_to_down</span><span class='words_sep'> </span><span class='tstring_content'>down_to_up</span><span class='words_sep'> </span><span class='tstring_content'>left_to_right</span><span class='words_sep'> </span><span class='tstring_content'>right_to_left</span><span class='tstring_end'>]</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
131
+
132
+ <dt id="BRUSH_DIRECTION-constant" class="">BRUSH_DIRECTION =
133
+
134
+ </dt>
135
+ <dd><pre class="code"><span class='qwords_beg'>%w[</span><span class='tstring_content'>vertical</span><span class='words_sep'> </span><span class='tstring_content'>vertical_inverted</span><span class='words_sep'> </span><span class='tstring_content'>horizontal</span><span class='words_sep'> </span><span class='tstring_content'>horizontal_inverted</span><span class='tstring_end'>]</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
136
+
137
+ <dt id="ALL_ALGORITHMS-constant" class="">ALL_ALGORITHMS =
138
+
139
+ </dt>
140
+ <dd><pre class="code"><span class='qwords_beg'>%w[</span><span class='tstring_content'>exchange</span><span class='words_sep'> </span><span class='tstring_content'>transpose</span><span class='words_sep'> </span><span class='tstring_content'>wrong_filter</span><span class='words_sep'> </span><span class='tstring_content'>slim</span><span class='words_sep'> </span><span class='tstring_content'>brus</span><span class='words_sep'> </span><span class='tstring_content'>change_byte</span><span class='words_sep'> </span><span class='tstring_content'>defect</span><span class='tstring_end'>]</span></span></pre></dd>
141
+
142
+ </dl>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <h2>
153
+ Instance Method Summary
154
+ <small><a href="#" class="summary_toggle">collapse</a></small>
155
+ </h2>
156
+
157
+ <ul class="summary">
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#call-instance_method" title="#call (instance method)">#<strong>call</strong> &#x21d2; Object </a>
163
+
164
+
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <span class="summary_desc"><div class='inline'></div></span>
177
+
178
+ </li>
179
+
180
+
181
+ <li class="public ">
182
+ <span class="summary_signature">
183
+
184
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(io, options = {}) &#x21d2; Sampler </a>
185
+
186
+
187
+
188
+ </span>
189
+
190
+
191
+ <span class="note title constructor">constructor</span>
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>A new instance of Sampler.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ </ul>
208
+
209
+
210
+ <div id="constructor_details" class="method_details_list">
211
+ <h2>Constructor Details</h2>
212
+
213
+ <div class="method_details first">
214
+ <h3 class="signature first" id="initialize-instance_method">
215
+
216
+ #<strong>initialize</strong>(io, options = {}) &#x21d2; <tt><span class='object_link'><a href="" title="ShatteredMachine::Sampler (class)">Sampler</a></span></tt>
217
+
218
+
219
+
220
+
221
+
222
+ </h3><div class="docstring">
223
+ <div class="discussion">
224
+
225
+ <p>Returns a new instance of Sampler.</p>
226
+
227
+
228
+ </div>
229
+ </div>
230
+ <div class="tags">
231
+ <p class="tag_title">Parameters:</p>
232
+ <ul class="param">
233
+
234
+ <li>
235
+
236
+ <span class='name'>io</span>
237
+
238
+
239
+ <span class='type'>(<tt><span class='object_link'><a href="Io.html" title="ShatteredMachine::Io (class)">ShatteredMachine::Io</a></span></tt>)</span>
240
+
241
+
242
+
243
+ &mdash;
244
+ <div class='inline'>
245
+ <p>Io containing paths for images to sample</p>
246
+ </div>
247
+
248
+ </li>
249
+
250
+ <li>
251
+
252
+ <span class='name'>options</span>
253
+
254
+
255
+ <span class='type'>(<tt>Hash</tt>)</span>
256
+
257
+
258
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
259
+
260
+
261
+ &mdash;
262
+ <div class='inline'>
263
+ <p>options for specifying which</p>
264
+ </div>
265
+
266
+ </li>
267
+
268
+ </ul>
269
+
270
+
271
+ </div><table class="source_code">
272
+ <tr>
273
+ <td>
274
+ <pre class="lines">
275
+
276
+
277
+ 15
278
+ 16
279
+ 17
280
+ 18
281
+ 19</pre>
282
+ </td>
283
+ <td>
284
+ <pre class="code"><span class="info file"># File 'lib/shattered_machine/sampler.rb', line 15</span>
285
+
286
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</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>
287
+ <span class='ivar'>@io</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span>
288
+ <span class='ivar'>@base_output_filename</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:base_output_filename</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sample</span><span class='tstring_end'>&#39;</span></span>
289
+ <span class='ivar'>@algorithms_to_sample</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:algorithms_to_sample</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="#ALL_ALGORITHMS-constant" title="ShatteredMachine::Sampler::ALL_ALGORITHMS (constant)">ALL_ALGORITHMS</a></span></span>
290
+ <span class='kw'>end</span></pre>
291
+ </td>
292
+ </tr>
293
+ </table>
294
+ </div>
295
+
296
+ </div>
297
+
298
+
299
+ <div id="instance_method_details" class="method_details_list">
300
+ <h2>Instance Method Details</h2>
301
+
302
+
303
+ <div class="method_details first">
304
+ <h3 class="signature first" id="call-instance_method">
305
+
306
+ #<strong>call</strong> &#x21d2; <tt>Object</tt>
307
+
308
+
309
+
310
+
311
+
312
+ </h3><table class="source_code">
313
+ <tr>
314
+ <td>
315
+ <pre class="lines">
316
+
317
+
318
+ 21
319
+ 22
320
+ 23
321
+ 24
322
+ 25
323
+ 26
324
+ 27
325
+ 28
326
+ 29
327
+ 30
328
+ 31</pre>
329
+ </td>
330
+ <td>
331
+ <pre class="code"><span class="info file"># File 'lib/shattered_machine/sampler.rb', line 21</span>
332
+
333
+ <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
334
+ <span class='const'><span class='object_link'><a href="#FILTERS-constant" title="ShatteredMachine::Sampler::FILTERS (constant)">FILTERS</a></span></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_filter'>filter</span><span class='op'>|</span>
335
+ <span class='id identifier rubyid_sample_exchange'>sample_exchange</span><span class='lparen'>(</span><span class='id identifier rubyid_filter'>filter</span><span class='rparen'>)</span>
336
+ <span class='id identifier rubyid_sample_transpose'>sample_transpose</span><span class='lparen'>(</span><span class='id identifier rubyid_filter'>filter</span><span class='rparen'>)</span>
337
+ <span class='id identifier rubyid_sample_wrong_filter'>sample_wrong_filter</span><span class='lparen'>(</span><span class='id identifier rubyid_filter'>filter</span><span class='rparen'>)</span>
338
+ <span class='kw'>end</span>
339
+ <span class='id identifier rubyid_sample_slim'>sample_slim</span>
340
+ <span class='id identifier rubyid_sample_brush'>sample_brush</span>
341
+ <span class='id identifier rubyid_sample_change_byte'>sample_change_byte</span>
342
+ <span class='id identifier rubyid_sample_defect'>sample_defect</span>
343
+ <span class='kw'>end</span></pre>
344
+ </td>
345
+ </tr>
346
+ </table>
347
+ </div>
348
+
349
+ </div>
350
+
351
+ </div>
352
+
353
+ <div id="footer">
354
+ Generated on Sun May 23 13:30:11 2021 by
355
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
356
+ 0.9.26 (ruby-2.6.6).
357
+ </div>
358
+
359
+ </div>
360
+ </body>
361
+ </html>