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

6
LINES

< > BotCompany Repo | #1032152 // intArrayToBufferedImage_new - faster than intArrayToBufferedImage? Note: It doesn't even work

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

Transpiled version (31L) is out of date.

// Note: pixels need to have alpha value set
static BufferedImage intArrayToBufferedImage_new(int[] pixels, int w, int h) {
  var img = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
  img.getRaster().setPixels(0, 0, w, h, pixels);
  ret img;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1032152
Snippet name: intArrayToBufferedImage_new - faster than intArrayToBufferedImage? Note: It doesn't even work
Eternal ID of this version: #1032152/4
Text MD5: bbfa0475e63f3b72f25de8fab6fda043
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-16 22:16:53
Source code size: 256 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 170 / 270
Version history: 3 change(s)
Referenced in: [show references]