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

5
LINES

< > BotCompany Repo | #1035823 // regionToIBinaryImage

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

Libraryless. Click here for Pure Java version (12839L/75K).

1  
static IBinaryImage regionToIBinaryImage(IImageRegion region) {
2  
  Rect r = region.bounds();
3  
  ret iBinaryImageFromFunction(r.w, r.h,
4  
    (x, y) -> !region.contains(r.x+x, r.y+y));
5  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): mowyntqkapby, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1035823
Snippet name: regionToIBinaryImage
Eternal ID of this version: #1035823/1
Text MD5: 2f818f99c9d102ff8716f85b380070e3
Transpilation MD5: 60bfa12e38452c0dfe59e48b2618355e
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-01 22:18:51
Source code size: 185 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 145 / 197
Referenced in: [show references]