1 | static BufferedImage cutOutPixelSet(BufferedImage image, PixelSet set) {
|
2 | Rect r = pixelSetBounds(set); |
3 | BufferedImage img = transparentBufferedImage(r.w, r.h); |
4 | for (Pixel p : set) |
5 | img.setRGB(p.x-r.x, p.y-r.y, image.getRGB(p.x, p.y)); |
6 | ret img; |
7 | } |
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: | 711 / 707 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |