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

10
LINES

< > BotCompany Repo | #1033761 // FastRegions_BWImage

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

Libraryless. Click here for Pure Java version (14705L/85K).

1  
sclass FastRegions_BWImage extends AbstractFastRegions<BWImage> {
2  
  int getColor(int pos) { ret image.getInt(x(pos), y(pos)); }
3  
  
4  
  RGB rgbForRegion(ImageRegion r) {
5  
    ret rgbFromGrayscale(r.brightness());
6  
  }  
7  
  
8  
  *(BWImage img) { super(img); }
9  
  *(BufferedImage img) { this(toBWImage(img)); }
10  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033761
Snippet name: FastRegions_BWImage
Eternal ID of this version: #1033761/62
Text MD5: 4bce82f0c60d7a83bf791b67f058d8c8
Transpilation MD5: 887cb87b171225c8577caf4692eb3a10
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-06-26 22:22:32
Source code size: 310 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 318 / 702
Version history: 61 change(s)
Referenced in: [show references]