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

8
LINES

< > BotCompany Repo | #1034862 // imageFromFunctionWithoutAlpha

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

Libraryless. Click here for Pure Java version (55L/1K).

1  
static BufferedImage imageFromFunctionWithoutAlpha(int w, int h default w, IF2_Int f) {
2  
  int[] pixels = new[w*h];
3  
  int i = 0;
4  
  for y to h:
5  
    for x to w:
6  
      pixels[i++] = f.get(x, y);
7  
  ret intArrayToBufferedImageWithoutAlpha(pixels, w, h);
8  
}

Author comment

Began life as a copy of #1032161

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1034862
Snippet name: imageFromFunctionWithoutAlpha
Eternal ID of this version: #1034862/1
Text MD5: 95937b3db045467101a337525a3a4e68
Transpilation MD5: aa495cb84e75ff361e4a6326762be81d
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-12 20:15:47
Source code size: 256 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 135 / 193
Referenced in: [show references]