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

7
LINES

< > BotCompany Repo | #1010155 // cutOutPixelSet - make RGBImage with alpha

JavaX fragment (include)

static BufferedImage cutOutPixelSet(BufferedImage image, PixelSet set) {
  Rect r = pixelSetBounds(set);
  BufferedImage img = transparentBufferedImage(r.w, r.h);
  for (Pixel p : set)
    img.setRGB(p.x-r.x, p.y-r.y, image.getRGB(p.x, p.y));
  ret img;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1010155
Snippet name: cutOutPixelSet - make RGBImage with alpha
Eternal ID of this version: #1010155/2
Text MD5: f26f524de7cba9f53b6443fff5ef59cb
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:10:46
Source code size: 261 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 381 / 392
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1010173 - cutOutPixelSet_scale - make RGBImage with alpha