Libraryless. Click here for Pure Java version (2201L/14K).
| 1 | static IBWImage iBWImageFromFloats(int w, float[] pixels) {
 | 
| 2 |   ret new IBWImage {
 | 
| 3 | int h = l(pixels)/w; | 
| 4 |     public int getWidth() { ret w; }
 | 
| 5 |     public int getHeight() { ret h; }
 | 
| 6 |     public float getFloatPixel(int x, int y) { ret pixels[y*w+x]; }
 | 
| 7 | }; | 
| 8 | } | 
Began life as a copy of #1022978
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1027297 | 
| Snippet name: | iBWImageFromFloats | 
| Eternal ID of this version: | #1027297/1 | 
| Text MD5: | 2d3a7e31f66d98b2bca7eb8969d3c246 | 
| Transpilation MD5: | 2e066747ed6fd9daf93461aee4576183 | 
| Author: | stefan | 
| Category: | javax / imaging | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2020-03-01 00:00:55 | 
| Source code size: | 262 bytes / 8 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 373 / 510 | 
| Referenced in: | [show references] |