Libraryless. Click here for Pure Java version (1688L/11K/37K).
1 | !752 |
2 | |
3 | // see http://stackoverflow.com/questions/12552144/resize-image-in-java-without-losing-transparency |
4 | |
5 | p {
|
6 | // is 512*512 |
7 | BufferedImage img = loadImage2("#1004221");
|
8 | |
9 | img = resizeImage(img, 256); |
10 | showImage(img); |
11 | savePNG(img, prepareProgramFile(img.getWidth() + ".png")); |
12 | } |
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: | #1004222 |
| Snippet name: | Try resizing a PNG and keeping the transparency [WORKS] |
| Eternal ID of this version: | #1004222/1 |
| Text MD5: | aebe08f2b7f3011bef24e9a7a7331a3d |
| Transpilation MD5: | ac2a91f0a2ceed13f0772efd50ae80b7 |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-08-10 17:43:06 |
| Source code size: | 300 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 868 / 989 |
| Referenced in: | [show references] |