zy445566 / node-digital-watermarking

A digital watermark is a kind of marker covertly embedded in a noise-tolerant signal such as an audio, video or image data. It is typically used to identify ownership of the copyright of such signal. "Watermarking" is the process of hiding digital information in a carrier signal; the hidden information should, but does not need to, contain a relation to the carrier signal. Digital watermarks may be used to verify the authenticity or integrity of the carrier signal or to show the identity of its owners. It is prominently used for tracing copyright infringements and for banknote authentication.
MIT License
326 stars 47 forks source link

不能打入汉字水印? #20

Open sheiy opened 10 months ago

sheiy commented 10 months ago
BindingError {
  name: 'BindingError',
  message: 'String has UTF-16 code units that do not fit in 8 bits',
  stack: 'BindingError: String has UTF-16 code units that do not fit in 8 bits\n' +
    '    at BindingError.<anonymous> (evalmachine.<anonymous>:21:1592938)\n' +
    '    at new BindingError (eval at createNamedFunction (evalmachine.<anonymous>:21:1592644), <anonymous>:4:34)\n' +
    '    at throwBindingError (evalmachine.<anonymous>:21:1593383)\n' +
    '    at Object.toWireType (evalmachine.<anonymous>:21:1600626)\n' +
    '    at Object.putText (eval at new_ (evalmachine.<anonymous>:21:1594131), <anonymous>:8:26)\n' +
    '    at Object.putText (evalmachine.<anonymous>:21:1715548)\n' +
    '    at addTextByMat (/Volumes/data/code/cisdi/app-watermark/node_modules/digital-watermarking/lib.js:89:8)\n' +
    '    at transFormMatWithText (/Volumes/data/code/cisdi/app-watermark/node_modules/digital-watermarking/lib.js:101:5)\n' +
    '    at Object.transformImageWithText (/Volumes/data/code/cisdi/app-watermark/node_modules/digital-watermarking/lib.js:186:16)\n' +
    '    at async Function.transformImageWithText (/Volumes/data/code/cisdi/app-watermark/node_modules/digital-watermarking/index.js:33:16)'
}
zy445566 commented 10 months ago

这跟汉字没关系,是因为你的字符编码是utf16,我们这个仅支持utf8