How can enable cv.imencode and cv.imdecode in opencv.js

i set {build_js.py} {opencv_js.config.py} as follows:
{build_js.py}
“-DWITH_JPEG=ON”,
“-DWITH_WEBP=ON”,
“-DBUILD_opencv_imgcodecs=ON”,
{opencv_js.config.py}

imgcodecs = {‘’: [‘imdecode’, ‘imencode’]}
white_list = makeWhiteList([imgproc, calib3d, imgcodecs])

but The opencv.js I packaged not have imgcodecs,
so what problem is,

that’s on purpose. if you’re using it from the webbrowser, use a canvas to decode images

see e.g. discussion here:

thank you very much。。。。。。。