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

12
LINES

< > BotCompany Repo | #1035047 // testImage2B (OK)

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

Libraryless. Click here for Pure Java version (8204L/47K).

1  
// We're mainly testing the "last 7 bits"
2  
svoid testImage2B() {
3  
  for (int w = 1; w <= 16; w++) {
4  
    print("Testing width " + w);
5  
    repeat 100 {
6  
      int threshold = random(257);
7  
      var img = randomBWImage(w, 1);
8  
      var binaryImage = new Image2B(img, threshold);
9  
      verifyImage2B(img, binaryImage, threshold);
10  
    }
11  
  }
12  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035047
Snippet name: testImage2B (OK)
Eternal ID of this version: #1035047/3
Text MD5: cae1b7a0b5008253f14376105d2b443e
Transpilation MD5: 0346c22e049861c12c67d9e39fabdefe
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-25 22:06:58
Source code size: 345 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 124 / 184
Version history: 2 change(s)
Referenced in: [show references]