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).

static IBWImage iBWImageFromFunction(IF2_IntInt_Double f, int w, int h) {
  ret new IBWImage {
    public int getWidth() { ret w; }
    public int getHeight() { ret h; }
    
    public float getFloatPixel(int x, int y) {
      ret (float) f.get(x, y);
    }
  };
}

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: 179 / 228
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1035821 - iBinaryImageFromFunction