Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1015043 // Put white background behind transparent image (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (8067L/54K).

1  
!7
2  
3  
p {
4  
  BufferedImage img = loadImage2(#1101217);
5  
  print("Has transparency: " + hasTransparency(img));
6  
  BufferedImage img2 = newBufferedImage(img.getWidth(), img.getHeight(), Color.white);
7  
  drawImageOnImage(img, img2, 0, 0);
8  
  print("Has transparency: " + hasTransparency(img2));
9  
  showImage(img2);
10  
}

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: #1015043
Snippet name: Put white background behind transparent image (OK)
Eternal ID of this version: #1015043/2
Text MD5: 709d55f2288663dbeff897728c36e7a5
Transpilation MD5: bc29e2dfe66436b23c376b1f02d611e6
Author: stefan
Category: javax / imaging
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-07 13:41:54
Source code size: 314 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 494 / 1232
Version history: 1 change(s)
Referenced in: [show references]