Convert binary array to base64
-
Hello, I want know what library is using Jsreport for load images from disc. Buffer?? Thanks
-
hi, (i'm going to assume that the question is about images used by assets)
the exact mechanism depends on the type of
@encoding
that you specify when calling an asset. for@encoding=dataURI
or@encoding=base64
it is just buffer serialization (buffer.toString('base64')
) the only difference is that@encoding=dataURI
adds a bit more data to make possible inline an image in thesrc
attribute of an img tag.you can check how all of this is done in the assets repository
-
Thanks!!!!!