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

9
LINES

< > BotCompany Repo | #1010159 // pixelsOfBufferedImage - also gets alpha channel

JavaX fragment (include)

static int[] pixelsOfBufferedImage(BufferedImage image) ctex {
  int width = image.getWidth();
  int height = image.getHeight();
  int[] pixels = new int[width*height];
  PixelGrabber pixelGrabber = new PixelGrabber(image, 0, 0, width, height, pixels, 0, width);
  if (!pixelGrabber.grabPixels())
    fail("Could not grab pixels");
  ret pixels;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, elmgxqgtpvxh, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1010159
Snippet name: pixelsOfBufferedImage - also gets alpha channel
Eternal ID of this version: #1010159/2
Text MD5: edbc06b3d8bb3fa0777de6a542e94791
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-05 17:37:24
Source code size: 355 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 451 / 501
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)