Libraryless. Click here for Pure Java version (5314L/34K).
1 | // doesn't clean the coordinates |
2 | static BufferedImage ii_clip(IntegralImage img, int x1, int y1, int w, int h) { |
3 | if (img == null) null; |
4 | BufferedImage out = newBufferedImage(w, h); |
5 | for y to h: |
6 | for x to w: |
7 | out.setRGB(x, y, ii_getPixel(img, x1+x, y1+y)); |
8 | ret out; |
9 | } |
10 | |
11 | static BufferedImage ii_clip(IntegralImage ii, DoubleRect r) { |
12 | ret ii_clip(ii, toRect(r)); |
13 | } |
14 | |
15 | static BufferedImage ii_clip(IntegralImage ii, Rect r) { |
16 | ret r == null ? null : ii_clip(ii, r.x, r.y, r.w, r.h); |
17 | } |
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: | #1025276 |
Snippet name: | ii_clip - returns BufferedImage |
Eternal ID of this version: | #1025276/3 |
Text MD5: | f6354182d379104c40ecd0901a1493cb |
Transpilation MD5: | 261fc8ca670508de0b3ac536fd83cca3 |
Author: | stefan |
Category: | javax / image analysis |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-09-17 02:12:16 |
Source code size: | 510 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 250 / 362 |
Version history: | 2 change(s) |
Referenced in: | [show references] |