Libraryless. Click here for Pure Java version (7895L/45K).
static int smallBWImageToInt(BWImage img) { int w = img.getWidth(), h = img.getHeight(); int pattern = 0; for y to h: for x to w: pattern = (pattern << 1) | (img.getInt(x, y) >> 7); ret pattern; }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035005 |
| Snippet name: | smallBWImageToInt |
| Eternal ID of this version: | #1035005/1 |
| Text MD5: | e0eda90c304e1e68934f601864784753 |
| Transpilation MD5: | a33d835135d6881c6190fdb04b6f459c |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-03-22 19:22:41 |
| Source code size: | 221 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 353 / 465 |
| Referenced in: | [show references] |