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

7
LINES

< > BotCompany Repo | #1005999 // img_bw_pixelMul - multiply every pixel brightness with a factor

JavaX fragment (include)

static BWImage img_bw_pixelMul(float f, BWImage a) {
  int w = a.w(), h = a.h();
  BWImage b = new BWImage(w, h);
  for y to h: for x to w:
    b.setPixel(x, y, a.getPixel(x, y)*f);
  ret b;
}

Author comment

Began life as a copy of #1005997

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: #1005999
Snippet name: img_bw_pixelMul - multiply every pixel brightness with a factor
Eternal ID of this version: #1005999/1
Text MD5: 937cf944225864138ae9fbf4f322e146
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:05:33
Source code size: 198 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 470 / 498
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)