1 | static BufferedImage dropAlphaChannelFromBufferedImage(BufferedImage img) { |
2 | if (img == null || img.getType() == BufferedImage.TYPE_INT_RGB) ret img; |
3 | int w = img.getWidth(), h = img.getHeight(); |
4 | BufferedImage newImage = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); |
5 | int[] rgb = img.getRGB(0, 0, w, h, null, 0, w); |
6 | newImage.setRGB(0, 0, w, h, rgb, 0, w); |
7 | ret newImage; |
8 | } |
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: | 367 / 411 |
Version history: | 3 change(s) |
Referenced in: | [show references] |