Libraryless. Click here for Pure Java version (5212L/29K).
srecord GrabbableIntPixels(int[] data, int w, int h, int offset, int scanlineStride) { int[] asPackedArray() { if (offset == 0 && data.length == w*h) ret data; int[] pixels = new[w*h]; for y to h: arrayCopy(data, offset+y*scanlineStride, pixels, y*h, w); ret pixels; } }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030543 | 
| Snippet name: | GrabbableIntPixels | 
| Eternal ID of this version: | #1030543/4 | 
| Text MD5: | edda0ea856062fc5de00096e72fe4d99 | 
| Transpilation MD5: | fc479fe4a3d97b9cefd36716c0884730 | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2022-02-05 03:03:24 | 
| Source code size: | 304 bytes / 9 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 524 / 816 | 
| Version history: | 3 change(s) | 
| Referenced in: | [show references] |