Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1003737 // scaleImage

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (3868L) is out of date.

1  
import java.awt.geom.AffineTransform;
2  
3  
// Benchmark on screenshot for 1 MP: ~5.2ms
4  
5  
// uses bilinear interpolation
6  
static BufferedImage scaleImage(BufferedImage before, double scaleX, double scaleY default scaleX) {
7  
    ret scaleImageWithOp(before, scaleX, scaleY, AffineTransformOp.TYPE_BILINEAR);
8  
}
9  
10  
static BufferedImage scaleImage(double scale, BufferedImage before) {
11  
  ret scaleImage(before, scale);
12  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003737
Snippet name: scaleImage
Eternal ID of this version: #1003737/5
Text MD5: d013acccc00389854a4d9cd820980fbc
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-04-15 18:38:16
Source code size: 417 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 718 / 774
Version history: 4 change(s)
Referenced in: [show references]