static RGBImage rgb111(RGBImage rgb) {
int w = rgb.width, h = rgb.height;
RGBImage img = new(w, h);
for y to h:
for x to w:
img.setPixel(x, y, rgbPixelTo111(rgb.getInt(x, y)));
ret img;
}
static RGBImage rgb111(BufferedImage img) {
ret rgb111(new RGBImage(img));
}Began life as a copy of #1015490
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: | #1020583 |
| Snippet name: | rgb111 - reduce RGBImage colors to 1-1-1 format (8 colors, as a new RGBImage) |
| Eternal ID of this version: | #1020583/4 |
| Text MD5: | 671bb4896ef3dfdc99ec0b35e81dc364 |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-12-27 17:41:08 |
| Source code size: | 296 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 729 / 715 |
| Version history: | 3 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |