static BufferedImage dropAlphaChannelFromBufferedImage(BufferedImage img) { if (img == null || img.getType() == BufferedImage.TYPE_INT_RGB) ret img; int w = img.getWidth(), h = img.getHeight(); BufferedImage newImage = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); int[] rgb = img.getRGB(0, 0, w, h, null, 0, w); newImage.setRGB(0, 0, w, h, rgb, 0, w); ret newImage; }
download show line numbers debug dex old transpilations
Travelled to 10 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019755 |
Snippet name: | dropAlphaChannelFromBufferedImage |
Eternal ID of this version: | #1019755/4 |
Text MD5: | 5e7e6b7f5e43ce19829d5a8d65eaf59e |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-25 00:28:09 |
Source code size: | 394 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 365 / 408 |
Version history: | 3 change(s) |
Referenced in: | [show references] |