node.js - Cropping a Base64 PNG in-memory using PURE JavaScript on the client side w/o using canvas -
Reference: JavaScript, as part of SDK (can be on node.js or browser).
Start point: I have a base 64 string that is actually a base 64 encoded PNG image (I got it from Selenium WebDriver - LaserSchot).
Question: How can I crop it?
Canvas related techniques seem irrelevant (or am I wrong?) My code runs as part of the test - maybe node.js The canvas approach does not seem fit here and can cause extra noise in the image too.
Any libraries I found, either meet with streams (maybe I should change the string to somehow stream?) Or deal
var base64png = Driver .See Screenshots (); Var png = new PNG (base64png); Return png.crop (50, 100, 20, 80) .toBase64 ();
?
Thank you!
Adding my previous comment as an answer:
Any such To get the raw image data needed to use the library as an image in the image, do not rely on the canvas.)
Comments
Post a Comment