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

10
LINES

< > BotCompany Repo | #1035238 // testBlockOptimizedIntMatrix

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

Libraryless. Click here for Pure Java version (10900L/62K).

static BufferedImage testBlockOptimizedIntMatrix(BufferedImage img default shootScreen2()) {
  int blockShift = 3;
  BlockOptimizedIntMatrix m = new(img.getWidth(), img.getHeight(), blockShift);
  copyMatrix(imageToMatrix(img), m);
  print("Size before opt=", deepObjectSize(m));
  m.optimize();
  print("Size after opt=", deepObjectSize(m));
  assertSameImage(img, matrixToImage(m));
  ret img;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1035238
Snippet name: testBlockOptimizedIntMatrix
Eternal ID of this version: #1035238/1
Text MD5: b755b50d2c96e4b43fa3ae317b39ea04
Transpilation MD5: 616cfbd49740fe7287c5c08ed0c43021
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-04-21 02:06:31
Source code size: 406 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 111 / 173
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)