static L<RGBImage> rgbImageVerticalSlices(double sliceHeight, RGBImage img) { new L<RGBImage> out; int w = img.getWidth(), h = img.getHeight(); for (double y = 0; iround(y) < h; y += sliceHeight) { int actualY = iround(y), nextY = min(h, iround(y+sliceHeight)); if (nextY > actualY) out.add(rgbClip(img, rectFromPoints(0, actualY, w, nextY))); } ret out; }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023027 |
Snippet name: | rgbImageVerticalSlices |
Eternal ID of this version: | #1023027/1 |
Text MD5: | 3cc9d04a5cddcc8af66f243151221084 |
Author: | stefan |
Category: | javax / image analysis |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-23 13:17:19 |
Source code size: | 389 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 363 / 359 |
Referenced in: | [show references] |