Skip to content

Using non data urls when running in node #108

@kierans

Description

@kierans

Thanks for this handy little library.

When running in node using node-canvas I'm wanting the result of the merge to be a buffer or a stream rather than a base64 encoded string. I think it would be possible to do this with an outputType option? The rules would be

  • If not provided defaults to dataURL
  • If running in browser, only dataURL is a permitted output type
  • Options include: dataURL, buffer, stream
  • If stream then based the canvas stream method is used based on mime type
    • image/png -> createPNGStream
    • image/jpeg -> createJPEGStream
    • application/pdf -> createPDFStream
    • else error

I'm happy to help with this feature, if it will be accepted/merged. 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions