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

7
LINES

< > BotCompany Repo | #1005997 // img_bw_hdiff

JavaX fragment (include)

static BWImage img_bw_hdiff(BWImage a) {
  int w = a.w()-1, h = a.h();
  BWImage b = new BWImage(w, h);
  for y to h: for x to w:
    b.setPixel(x, y, Math.abs(a.getPixel(x, y)-a.getPixel(x+1, y)));
  ret b;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005997
Snippet name: img_bw_hdiff
Eternal ID of this version: #1005997/1
Text MD5: 43bc36639060ccb3ecc0129b7630bb8c
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-14 02:02:40
Source code size: 215 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 429 / 482
Referenced in: #1005999 - img_bw_pixelMul - multiply every pixel brightness with a factor
#1006000 - img_bw_vdiff
#1006654 - Standard functions list 2 (LIVE, continuation of #761)