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

10
LINES

< > BotCompany Repo | #1018779 // clipBWImage

JavaX fragment (include)

static BWImage clipBWImage(BWImage img, int x1, int y1, int w, int h) {
  if (x1 == 0 && y1 == 0 && w == img.getWidth() && h == img.getHeight()) ret img;
  BWImage img2 = new(w, h);
  copyBWImage(img, x1, y1, img2, 0, 0, w, h);
  ret img2;
}

static BWImage clipBWImage(BWImage img, Rect r) {
  ret clipBWImage(img, r.x, r.y, r.w, r.h);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018779
Snippet name: clipBWImage
Eternal ID of this version: #1018779/3
Text MD5: d773b9fdccd5b62b4bab38e5383b5b49
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-14 13:36:41
Source code size: 347 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 382 / 431
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1022982 - clipIBWImage (virtual clip)