Libraryless. Click here for Pure Java version (3035L/19K).
1 | static BWImage floatArraysToBWImageColumns(int h, L<float[]> l) {
|
2 | int w = lengthLevel2_gen(l); |
3 | if (w == 0) null; |
4 | int x = 0; |
5 | BWImage img = new(w, h); |
6 | for (float[] a : l) {
|
7 | int ww = l(a); |
8 | for xx to ww: {
|
9 | float f = a[xx]; |
10 | for y to h: |
11 | img.setPixel(x+xx, y, f); |
12 | } |
13 | x += ww; |
14 | } |
15 | ret img; |
16 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025100 |
| Snippet name: | floatArraysToBWImageColumns |
| Eternal ID of this version: | #1025100/4 |
| Text MD5: | e3f20ea030e0d4391eca7bca5b9a0372 |
| Transpilation MD5: | 8d905c56cb5d51fc715b51cfb779e00e |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-09-05 15:41:13 |
| Source code size: | 345 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 474 / 607 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |