Skip to content

Latest commit

 

History

History
49 lines (29 loc) · 2.83 KB

docs.md

File metadata and controls

49 lines (29 loc) · 2.83 KB

fnCallback

src/node-base64-image.js:13-13

Callback for encode/decode functions

Parameters

encode

src/node-base64-image.js:27-65

Encodes a remote or local image to Base64 encoded string or Buffer

Parameters

  • url string URL of remote image or local path to image
  • options [Object] Options object for extra configuration (optional, default {})
    • options.string boolean Returns a Base64 encoded string. Defaults to Buffer object
    • options.local boolean Encode a local image file instead of a remote image
  • callback fnCallback Callback function

Returns fnCallback Returns the callback

result

src/node-base64-image.js:41-41

result

src/node-base64-image.js:58-58

decode

src/node-base64-image.js:77-89

Decodes an base64 encoded image buffer and saves it to disk

Parameters

  • imageBuffer Buffer Image Buffer object
  • options [Object] Options object for extra configuration (optional, default {})
    • options.filename string Filename for the final image file
  • callback fnCallback Callback function

Returns fnCallback Returns the callback