static L<BufferedImage> bufferedImageHorizontalSlices(double sliceWidth, BufferedImage img) { new L<BufferedImage> out; int w = img.getWidth(), h = img.getHeight(); for (double x = 0; iround(x) < w; x += sliceWidth) { int actualX = iround(x), nextX = min(w, iround(x+sliceWidth)); if (nextX > actualX) out.add(clipBufferedImage(img, rectFromPoints(actualX, 0, nextX, h))); } ret out; }
Began life as a copy of #1024668
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: | #1024672 |
Snippet name: | bufferedImageHorizontalSlices |
Eternal ID of this version: | #1024672/3 |
Text MD5: | e0619f08f15c281cdb91a5bc5f9c15a1 |
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:48:36 |
Source code size: | 418 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 226 / 268 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |