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

18
LINES

< > BotCompany Repo | #1007157 // bwResizeSmooth - resize BWImage smoothly

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

Libraryless. Click here for Pure Java version (5168L/33K).

1  
static BWImage bwResizeSmooth(BWImage img, int w) {
2  
  ret new BWImage(scaleImage(img.getBufferedImage(), ((double) w)/img.getWidth()));
3  
}
4  
5  
static BWImage bwResizeSmooth(BWImage img, int w, int h) {
6  
  ret new BWImage(scaleImage(img.getBufferedImage(),
7  
    ((double) w)/img.getWidth(),
8  
    ((double) h)/img.getHeight()));
9  
}
10  
11  
static BWImage bwResizeSmooth(int w, BWImage img) {
12  
  ret bwResizeSmooth(img, w);
13  
}
14  
15  
static BWImage bwResizeSmooth(int w, BufferedImage img) {
16  
  ret new BWImage(scaleImage(img,
17  
    ((double) w)/img.getWidth()));
18  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007157
Snippet name: bwResizeSmooth - resize BWImage smoothly
Eternal ID of this version: #1007157/7
Text MD5: 8266a25b99533acb4a71532d7456745d
Transpilation MD5: 6f612b9e44f971fe83f8bfd185bc6ffd
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-01 01:43:52
Source code size: 553 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 553 / 671
Version history: 6 change(s)
Referenced in: [show references]