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

9
LINES

< > BotCompany Repo | #1020185 // pixelsWithNonZeroSaturation

JavaX fragment (include)

static L<Pt> pixelsWithNonZeroSaturation(BufferedImage img) {
  if (img == null) null;
  int w = img.getWidth(), h = img.getHeight();
  new L<Pt> out;
  for y to h: for x to w:
    if (saturationFromRGB(img.getRGB(x, y)) != 0)
      out.add(pt(x, y));
  ret out;
}

Author comment

Began life as a copy of #1020184

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020185
Snippet name: pixelsWithNonZeroSaturation
Eternal ID of this version: #1020185/1
Text MD5: 5f32eaad0f6577347d0567ee80f274dd
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-09 21:15:25
Source code size: 272 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 289 / 316
Referenced in: [show references]