Libraryless. Click here for Pure Java version (9656L/54K).
static BufferedImage renderImageOnBackground(Color bg, BufferedImage img) { if (img == null) null; BufferedImage canvas = newBufferedImage(img.getWidth(), img.getHeight(), bg); drawImageOnImage(img, canvas); ret canvas; } static BufferedImage renderImageOnBackground(BufferedImage img, Color bg) { ret renderImageOnBackground(bg, img); }
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: | 132 / 194 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1035952 - centerImageOnBackground |