1 | static L<RGBImage> rgbImageVerticalSlices(double sliceHeight, RGBImage img) { |
2 | new L<RGBImage> out; |
3 | int w = img.getWidth(), h = img.getHeight(); |
4 | for (double y = 0; iround(y) < h; y += sliceHeight) { |
5 | int actualY = iround(y), nextY = min(h, iround(y+sliceHeight)); |
6 | if (nextY > actualY) |
7 | out.add(rgbClip(img, rectFromPoints(0, actualY, w, nextY))); |
8 | } |
9 | ret out; |
10 | } |
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: | 365 / 361 |
Referenced in: | [show references] |