Libraryless. Click here for Pure Java version (1939L/13K).
static L<BufferedImage> bufferedImageVerticalSlices(double sliceHeight, BufferedImage img) { new L<BufferedImage> 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(clipBufferedImage(img, rectFromPoints(0, actualY, w, nextY))); } ret out; }
Began life as a copy of #1023027
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024668 |
Snippet name: | bufferedImageVerticalSlices |
Eternal ID of this version: | #1024668/2 |
Text MD5: | 7a018d5bae6d271753f961540b4b6695 |
Transpilation MD5: | f3908aa5bd159c038561e37089a1482a |
Author: | stefan |
Category: | javax / image analysis |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-22 23:42:29 |
Source code size: | 419 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 225 / 314 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1024670 - bufferedImageNVerticalSlices #1024672 - bufferedImageHorizontalSlices |