Libraryless. Click here for Pure Java version (7895L/45K).
1 | static int smallBWImageToInt(BWImage img) { |
2 | int w = img.getWidth(), h = img.getHeight(); |
3 | int pattern = 0; |
4 | for y to h: |
5 | for x to w: |
6 | pattern = (pattern << 1) | (img.getInt(x, y) >> 7); |
7 | ret pattern; |
8 | } |
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: | 137 / 197 |
Referenced in: | [show references] |