javascript - convert an image server side to CanvasPixelArray -


edit

so looks have somehow convert image to

https://developer.mozilla.org/en/dom/canvaspixelarray serverside

my current attempts have been *

pass base64 encoded image server ... converting binary atob()

but stuck trying draw onto canvas without having like

var = new image(); i.onload = function(){.....} i.src = "base64 string" 

so more general statement

i trying bypass creating image object means display new image

if goal avoid use of javascript , embed image in page, can do

<img src="data:image/png;base64,uhhiaminbase64..."> 

if base64 obtained dynamically in ajax, way use decoding library create image object code made.

an alternate solution send directly rgb values in binary array (base64 encoded if use json) , iterate client-side on array in order change canvas' imagedata. seems easy enough inefficient wouldn't have compression of png or jpeg.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -