Libraryless. Click here for Pure Java version (9656L/54K).
1 | static BufferedImage renderImageOnBackground(Color bg, BufferedImage img) { |
2 | if (img == null) null; |
3 | BufferedImage canvas = newBufferedImage(img.getWidth(), img.getHeight(), bg); |
4 | drawImageOnImage(img, canvas); |
5 | ret canvas; |
6 | } |
7 | |
8 | static BufferedImage renderImageOnBackground(BufferedImage img, Color bg) { |
9 | ret renderImageOnBackground(bg, img); |
10 | } |
Began life as a copy of #1015043
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, ekrmjmnbrukm, elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1035292 |
Snippet name: | renderImageOnBackground |
Eternal ID of this version: | #1035292/4 |
Text MD5: | f6574939f6b17f4f29cc30577795d5f3 |
Transpilation MD5: | b135d0267d9245ccc878de59eccdcbfc |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-06-27 10:43:21 |
Source code size: | 353 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 131 / 193 |
Version history: | 3 change(s) |
Referenced in: | [show references] |