static RGBImage rgbRotate180(RGBImage img) { int w = img.getWidth(), h = img.getHeight(); RGBImage rgb = new(w, h); for y to h: for x to w: rgb.setInt(x, y, img.getInt(w-1-x, h-1-y)); ret rgb; }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023037 |
Snippet name: | rgbRotate180 |
Eternal ID of this version: | #1023037/1 |
Text MD5: | 302bb69fbcae3df246612eda33884a31 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-23 13:50:18 |
Source code size: | 212 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 251 / 269 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1035924 - rotate180 - rotate image 180° (OK) |