(OutputStream out, byte[] pixels)
| 19 | } |
| 20 | |
| 21 | void write8BitImage(OutputStream out, byte[] pixels) throws IOException { |
| 22 | int bytesWritten = 0; |
| 23 | int size = fi.width*fi.height; |
| 24 | int count = getCount(size); |
| 25 | while (bytesWritten<size) { |
| 26 | if ((bytesWritten + count)>size) |
| 27 | count = size - bytesWritten; |
| 28 | //System.out.println(bytesWritten + " " + count + " " + size); |
| 29 | out.write(pixels, bytesWritten, count); |
| 30 | bytesWritten += count; |
| 31 | showProgress((double)bytesWritten/size); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | void write8BitStack(OutputStream out, Object[] stack) throws IOException { |
| 36 | showProgressBar = false; |
no test coverage detected