static void saveBMP(BufferedImage img, File file) ctex { // drop alpha component BufferedImage newBufferedImage = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_RGB); newBufferedImage.createGraphics().drawImage(img, 0, 0, Color.WHITE, null); assertTrue("BMP writing failed", ImageIO.write(newBufferedImage, "bmp", mkdirsFor(file))); } static void saveBMP(File file, BufferedImage img) ctex { saveBMP(img, file); }
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: | 590 / 634 |
Version history: | 1 change(s) |
Referenced in: | [show references] |