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

10
LINES

< > BotCompany Repo | #1015021 // subtractRGBImages

JavaX fragment (include)

static RGBImage subtractRGBImages(RGBImage image, RGBImage image2) {
  int w = image.getWidth(), h = image.getHeight();
  RGBImage out = new RGBImage(w, h);
  for (int y = 0; y < h; y++)
    for (int x = 0; x < w; x++) {
      RGB a = image.getRGB(x, y), b = image2.getRGB(x, y);
      out.setPixel(x, y, fixRGB(a.r-b.r+0.5f, a.g-b.g+0.5f, a.b-b.b+0.5f));
    }
  ret out;
}

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: #1015021
Snippet name: subtractRGBImages
Eternal ID of this version: #1015021/2
Text MD5: ef38247d9716ff30224a5eccae9ff5a9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-07 01:24:24
Source code size: 385 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 277 / 332
Version history: 1 change(s)
Referenced in: [show references]