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).

sclass FastRegions_BWImage extends AbstractFastRegions<BWImage> {
  int getColor(int pos) { ret image.getInt(x(pos), y(pos)); }
  
  RGB rgbForRegion(ImageRegion r) {
    ret rgbFromGrayscale(r.brightness());
  }  
  
  *(BWImage img) { super(img); }
  *(BufferedImage img) { this(toBWImage(img)); }
}

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: 317 / 700
Version history: 61 change(s)
Referenced in: [show references]