1 | static RGBImage subtractRGBImages(RGBImage image, RGBImage image2) { |
2 | int w = image.getWidth(), h = image.getHeight(); |
3 | RGBImage out = new RGBImage(w, h); |
4 | for (int y = 0; y < h; y++) |
5 | for (int x = 0; x < w; x++) { |
6 | RGB a = image.getRGB(x, y), b = image2.getRGB(x, y); |
7 | out.setPixel(x, y, fixRGB(a.r-b.r+0.5f, a.g-b.g+0.5f, a.b-b.b+0.5f)); |
8 | } |
9 | ret out; |
10 | } |
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: | 339 / 403 |
Version history: | 1 change(s) |
Referenced in: | [show references] |