Libraryless. Click here for Pure Java version (10932L/63K).
1 | static Image2B toImage2B(BufferedImage img) { |
2 | ret img == null ? : new Image2B(img); |
3 | } |
4 | |
5 | static Image2B toImage2B(MakesBufferedImage img) { |
6 | if (img == null) null; |
7 | if (img cast Image2B) ret img; |
8 | if (img cast BWImage) ret Image2B(img); |
9 | if (img cast IBinaryImage) ret iBinaryImageToImage2B(img); |
10 | ret new Image2B(toBufferedImage(img)); |
11 | } |
Began life as a copy of #1014995
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035494 |
Snippet name: | toImage2B |
Eternal ID of this version: | #1035494/4 |
Text MD5: | 30b3f25e079505a69b9ac1cbcfe163dc |
Transpilation MD5: | 06cfad746195fd9234606613d4a47e31 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-08-01 22:14:20 |
Source code size: | 353 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 139 / 189 |
Version history: | 3 change(s) |
Referenced in: | [show references] |