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)

1  
static int[] pixelsOfBufferedImage(BufferedImage image) ctex {
2  
  int width = image.getWidth();
3  
  int height = image.getHeight();
4  
  int[] pixels = new int[width*height];
5  
  PixelGrabber pixelGrabber = new PixelGrabber(image, 0, 0, width, height, pixels, 0, width);
6  
  if (!pixelGrabber.grabPixels())
7  
    fail("Could not grab pixels");
8  
  ret pixels;
9  
}

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: 450 / 500
Version history: 1 change(s)
Referenced in: [show references]