Libraryless. Click here for Pure Java version (11087L/64K).
1 | sinterface IBinaryImage extends MakesBufferedImage { |
2 | bool getBoolPixel(int x, int y); |
3 | |
4 | default void setPixel(int x, int y, bool b) { throw unimplemented(); } |
5 | |
6 | default bool getBoolPixel(Pt p) { |
7 | ret getBoolPixel(p.x, p.y); |
8 | } |
9 | |
10 | default bool getBoolPixel_noRangeCheck(int x, int y) { ret getBoolPixel(x, y); } |
11 | |
12 | public default BufferedImage getBufferedImage() { |
13 | ret toImage2B().getBufferedImage(); |
14 | } |
15 | |
16 | default Image2B toImage2B() { |
17 | ret this instanceof Image2B ? (Image2B) this : iBinaryImageToImage2B(this); |
18 | } |
19 | } |
Began life as a copy of #1022978
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034924 |
Snippet name: | IBinaryImage - interface virtualizing Image2B |
Eternal ID of this version: | #1034924/8 |
Text MD5: | b2b3262b0b8d3dd67615dae66cb69cf8 |
Transpilation MD5: | 0205c2decca53b7c04aa46cd6eedb7f5 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-09-05 01:23:53 |
Source code size: | 560 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 212 / 302 |
Version history: | 7 change(s) |
Referenced in: | [show references] |