1 | static RGBImage rgbResize(RGBImage img, int w, int h) { |
2 | if (w == img.w() && h == img.h()) ret img; |
3 | ret new RGBImage(resizeImage(img.getBufferedImage(), w, h)); |
4 | } |
5 | |
6 | static RGBImage rgbResize(RGBImage img, int w) { |
7 | int h = iround(img.h()*(double) w/img.w()); |
8 | ret rgbResize(img, w, h); |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006810 |
Snippet name: | rgbResize - resize image |
Eternal ID of this version: | #1006810/2 |
Text MD5: | 5692c4b955646809a67edd1a59eb9e08 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-27 21:37:08 |
Source code size: | 299 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 456 / 500 |
Version history: | 1 change(s) |
Referenced in: | [show references] |