Libraryless. Click here for Pure Java version (10947L/62K).
static IBinaryImage iBinaryImageFromFunction(IIntIntPred f, int w, int h) { ret new IBinaryImage { public int getWidth() { ret w; } public int getHeight() { ret h; } public bool getBoolPixel(int x, int y) { ret f.get(x, y); } }; } static IBinaryImage iBinaryImageFromFunction(int w, int h, IIntIntPred f) { ret iBinaryImageFromFunction(f, w, h); }
Began life as a copy of #1033589
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
| Snippet ID: | #1035821 |
| Snippet name: | iBinaryImageFromFunction |
| Eternal ID of this version: | #1035821/3 |
| Text MD5: | a5743bbd417ac214bbc023c44bab336d |
| Transpilation MD5: | 46dc34ab9e2e264c577f9766c7b23acd |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-08-01 22:19:22 |
| Source code size: | 394 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 422 / 522 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |