Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1033589 // iBWImageFromFunction

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4741L/27K).

1  
static IBWImage iBWImageFromFunction(IF2_IntInt_Double f, int w, int h) {
2  
  ret new IBWImage {
3  
    public int getWidth() { ret w; }
4  
    public int getHeight() { ret h; }
5  
    
6  
    public float getFloatPixel(int x, int y) {
7  
      ret (float) f.get(x, y);
8  
    }
9  
  };
10  
}

Author comment

Began life as a copy of #1033573

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033589
Snippet name: iBWImageFromFunction
Eternal ID of this version: #1033589/1
Text MD5: ff1c96066ef952643b3bf822fa586f73
Transpilation MD5: 845f21ce2b6ee0e63df8fcf8c42c5051
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-11-04 04:02:26
Source code size: 274 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 178 / 228
Referenced in: [show references]