Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1023027 // rgbImageVerticalSlices

JavaX fragment (include)

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: 237 / 257
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1024668 - bufferedImageVerticalSlices