javascript - Convert an ImageData object (not a canvas) to image dataURL -
i create dataurl imagedata object (i.e. width, height, data). realize canvas has this, want avoid distortions canvas use has (alpha premultiply mainly) .. i.e. want avoid obvious canvas.putimagedata step.
from this post can make arraybuffer/typedarray/dataview base64. dont know how canvas dataurl adds width/height uint8 data portion of base64 string. nor know how png conversion done. (i'd ok raw data image type don't think there 1 .. png , jpg)
possible approaches:
- load imagedata canvas putimagedata. fails, distorts data.
- create image img.src = base64 data. fails, has canvas dataurl.
- other?
anyone know how construct image dataurl raw width, height, data imagedata?
Comments
Post a Comment