// angle is in degrees (clockwise, 0 is north, 360 is full rotation) // uses white background static BufferedImage rotateImageInSameSize(BufferedImage img, double angle) { int w = img.getWidth(), h = img.getHeight(); BufferedImage canvas = newBufferedImage(w, h, Color.white); drawRotatedImageOnImage(img, canvas, 0, 0, angle, w/2, h/2); ret canvas; }
Began life as a copy of #1015053
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: | #1015056 |
Snippet name: | rotateImageInSameSize |
Eternal ID of this version: | #1015056/5 |
Text MD5: | b4b56ef2ac40a88f9d3f47c0fca8b50b |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-08-03 17:28:26 |
Source code size: | 366 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 433 / 460 |
Version history: | 4 change(s) |
Referenced in: | [show references] |