Libraryless. Click here for Pure Java version (60L/1K).
1 | // undefined color, seems to be all black in practice |
2 | static BufferedImage newGrayBufferedImage(int w, int h) { |
3 | ret new BufferedImage(w, h, BufferedImage.TYPE_BYTE_GRAY); |
4 | } |
5 | |
6 | static BufferedImage newGrayBufferedImage(int w, int h, byte[] pixels) { |
7 | ret byteArrayToGrayBufferedImage(pixels, w, h); |
8 | } |
Began life as a copy of #1006917
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033435 |
Snippet name: | newGrayBufferedImage |
Eternal ID of this version: | #1033435/6 |
Text MD5: | fff7b7e5373c92943098bdfc63420d72 |
Transpilation MD5: | 362da79de57839ee387dc9cef1f5ded6 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-27 15:54:06 |
Source code size: | 307 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 147 / 218 |
Version history: | 5 change(s) |
Referenced in: | [show references] |