static BWImage saturationChannel(BufferedImage img) { if (img == null) null; int w = img.getWidth(), h = img.getHeight(); BWImage img2 = new(w, h); for y to h: for x to w: img2.setPixel(x, y, (float) saturationFromRGB(img.getRGB(x, y))); ret img2; }
Began life as a copy of #1020182
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020184 |
Snippet name: | saturationChannel |
Eternal ID of this version: | #1020184/3 |
Text MD5: | 819dbcc3b649069fc10d66177e19cf21 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-09 21:13:37 |
Source code size: | 270 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 275 / 314 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1020185 - pixelsWithNonZeroSaturation #1024727 - transformBufferedImageToBWImage |