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

16
LINES

< > BotCompany Repo | #1018736 // showImageWithBlurSliders (horizontal/vertical box blur)

JavaX fragment (include)

1  
static ImageSurface showImageWithBlurSliders(S name, final BufferedImage img) {
2  
  final ImageSurface is = showImage(name, img);
3  
  final SimpleLiveValue<Float> lvX = floatLiveValue();
4  
  final SimpleLiveValue<Float> lvY = floatLiveValue();
5  
  
6  
  Runnable update = r {
7  
    is.setImage(new BoxBlurFilter(iround(lvX!), iround(lvY!)).filter(img, null))
8  
  };
9  
  
10  
  lvX.onChange(update);
11  
  lvY.onChange(update);
12  
  addToWindowAndPack(is, vstack(
13  
    withLabel("Horizontal blur:", jLiveValueSliderZeroToX(10, lvX)),
14  
    withLabel("Vertical blur:", jLiveValueSliderZeroToX(10, lvY))));
15  
  ret is;
16  
}

Author comment

Began life as a copy of #1018687

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018736
Snippet name: showImageWithBlurSliders (horizontal/vertical box blur)
Eternal ID of this version: #1018736/4
Text MD5: d8e15efcf3bff4b0e31bc592bcae26a5
Author: stefan
Category: javax / imaging / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-12 12:16:17
Source code size: 599 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 316 / 365
Version history: 3 change(s)
Referenced in: [show references]