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

11
LINES

< > BotCompany Repo | #1020585 // used332Colors - return bitset of used 3-3-2 colors in image

JavaX fragment (include)

static BitSet used332Colors(BufferedImage img) {
  ret used332Colors(RGBImage(img));
}

static BitSet used332Colors(RGBImage img) {
  int w = img.w(), h = img.h();
  new BitSet bs;
  for y to h: for x to w:
    setBit(bs, ubyteToInt(to332(img.getInt(x, y))));
  ret bs;
}

Author comment

Began life as a copy of #1019830

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: #1020585
Snippet name: used332Colors - return bitset of used 3-3-2 colors in image
Eternal ID of this version: #1020585/1
Text MD5: 3e2a24135fecb29933e583e8632613d0
Author: stefan
Category: javax / image analysis
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-27 17:33:12
Source code size: 281 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 165 / 190
Referenced in: [show references]