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

15
LINES

< > BotCompany Repo | #1015488 // rgbContrastAndBrightness

JavaX fragment (include)

static RGBImage rgbContrastAndBrightness(RGBImage img, float scaleFactor, float offset) {
  BufferedImage i = cloneBufferedImage(img.getBufferedImage());
  new RescaleOp(scaleFactor, offset, null).filter(i, i);
  ret new RGBImage(i);
}

static RGBImage rgbContrastAndBrightness(float scaleFactor, float offset, RGBImage img) {
  ret rgbContrastAndBrightness(img, scaleFactor, offset);
}

static RGBImage rgbContrastAndBrightness(float scaleFactor, float offset, BufferedImage img) {
  BufferedImage i = cloneBufferedImage(img);
  new RescaleOp(scaleFactor, offset, null).filter(i, i);
  ret new RGBImage(i);
}

Author comment

Began life as a copy of #1015458

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: #1015488
Snippet name: rgbContrastAndBrightness
Eternal ID of this version: #1015488/4
Text MD5: dd282815ac2125cff5830835b1cb3681
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-15 02:03:10
Source code size: 623 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 402 / 437
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)