DjDeveloperr/deno-canvas

canvas.toBuffer("image/jpeg") still makes a PNG

jtoppine opened this issue · 1 comments

According to types.ts and lib.js, toBuffer() should accept type argument and support "image/png" as well as "image/jpeg". However, a PNG image is created even if "image/jpeg" is specified.

PNG's can be pretty big for photos, JPG would be nice to have thumbnail creation and such.

Hmm, I tried looking into this and specifying "image/jpeg" seems to just return undefined for me (not PNG), which I suspect is because canvaskit was not compiled with JPEG support.