1 | static void saveBMP(BufferedImage img, File file) ctex {
|
2 | // drop alpha component |
3 | BufferedImage newBufferedImage = new BufferedImage(img.getWidth(), |
4 | img.getHeight(), BufferedImage.TYPE_INT_RGB); |
5 | newBufferedImage.createGraphics().drawImage(img, 0, 0, Color.WHITE, null); |
6 | |
7 | assertTrue("BMP writing failed", ImageIO.write(newBufferedImage, "bmp", mkdirsFor(file)));
|
8 | } |
9 | |
10 | static void saveBMP(File file, BufferedImage img) ctex { |
11 | saveBMP(img, file); |
12 | } |
Began life as a copy of #1003962
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1004274 |
| Snippet name: | saveBMP |
| Eternal ID of this version: | #1004274/2 |
| Text MD5: | 607159c1da9f3725428661b45ac6ab41 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-06-20 01:08:23 |
| Source code size: | 464 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 825 / 878 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |