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

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

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: 46 / 82
Version history: 2 change(s)
Referenced in: [show references]