Libraryless. Click here for Pure Java version (9447L/55K).
1 | sclass BWIntegralImageMaker1 implements IBWIntegralImageMaker { |
2 | public IBWIntegralImage toBWIntegralImage(BufferedImage image) { |
3 | //if (image.getRaster().getSampleModel() instanceof PixelInterleavedSampleModel) // gray image |
4 | if (is8BitGrayscale(image)) |
5 | ret new BWIntegralImage(grabbableGrayPixels(image)); |
6 | else { // rgb image |
7 | ret new BWIntegralImage(grabbableIntPixels_fastOrSlow(image)); |
8 | // broken!? var gray = rgbToGrayUsingImageTypeAndDrawImage(image); |
9 | // grab(grabbableGrayPixels(gray)); |
10 | } |
11 | } |
12 | } |
Began life as a copy of #1033443
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033445 |
Snippet name: | BWIntegralImageMaker1 |
Eternal ID of this version: | #1033445/4 |
Text MD5: | 7c9fcfbb66b688f8d743aee127a51669 |
Transpilation MD5: | 43caa19e4f3d9d9a851bf0e8d3db4d3b |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-28 16:41:12 |
Source code size: | 551 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 135 / 224 |
Version history: | 3 change(s) |
Referenced in: | [show references] |