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

12
LINES

< > BotCompany Repo | #1005963 // totalPixelCount - number of all pixels in an image or list of images

JavaX fragment (include)

1  
static long totalPixelCount(L l) {
2  
  long sum = 0;
3  
  for (O o : l)
4  
    sum += totalPixelCount(o);
5  
  ret sum;
6  
}
7  
8  
static long totalPixelCount(O o) {
9  
  if (o << BWImage)
10  
    ret o/BWImage.getWidth()*o/BWImage.getHeight();
11  
  ret 0L;
12  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1005963
Snippet name: totalPixelCount - number of all pixels in an image or list of images
Eternal ID of this version: #1005963/1
Text MD5: dea77d548b21b6e3341d17d5f02e0c58
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-13 23:23:30
Source code size: 241 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 436 / 481
Referenced in: [show references]