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

14
LINES

< > BotCompany Repo | #1015223 // saveScreenClip

JavaX fragment (include)

svoid saveScreenClip(BWImage img) {
  S md5 = ocrMD5OfBWImage(img);
  File f = screenClipFileForMD5(md5);
  if (!f.exists()) {
    BufferedImage bufferedImage = img.getBufferedImage();
    assertBWImagesIdentical(img, new BWImage(bufferedImage));
    // verify 1
    //assertEquals("BufferedImage md5", md5, ocrMD5OfBufferedImage(bufferedImage));
    savePNG(f, bufferedImage);
    //bufferedImage = loadBufferedImage(f);
    // verify 2
    //assertEquals("loaded", md5, ocrMD5OfBufferedImage(bufferedImage));
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1015223
Snippet name: saveScreenClip
Eternal ID of this version: #1015223/4
Text MD5: c645422a177841af95083ac62157d64f
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-10 23:45:23
Source code size: 529 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 385 / 423
Version history: 3 change(s)
Referenced in: [show references]