(data, dictionary)
| 23 | import BufferOut from "commodetto/BufferOut"; |
| 24 | |
| 25 | export default function decompress(data, dictionary) { |
| 26 | let jpeg = new JPEG(data, dictionary); |
| 27 | |
| 28 | let offscreen = new BufferOut({width: jpeg.width, height: jpeg.height, pixelFormat: jpeg.bitmap.pixelFormat}); |
| 29 | let render = new Poco(offscreen); |
| 30 | |
| 31 | while (jpeg.ready) { |
| 32 | let block = jpeg.read(); |
| 33 | render.begin(block.x, block.y, block.width, block.height); |
| 34 | render.drawBitmap(block, block.x, block.y); |
| 35 | render.end(); |
| 36 | } |
| 37 | |
| 38 | return offscreen.bitmap; |
| 39 | } |
nothing calls this directly
no test coverage detected