Questions tagged [putimagedata]

The putImageData() is a method of the HTML5 Canvas, and is used to place new image data onto an existing image.

The putImageData(imageData, dx, dy) method of the 2D API places the contents of the imageData array into the calling CanvasRenderingContext2D object at position (dx, dy).

An optional 'dirty rectangle' can be used to clip the imageData.

For more information, see MDN.

81 questions
1
vote
1 answer

i want to color the pixels without changing the alpha value .how to do ? this is not working for me

window.onload = function() { var Can1 = document.getElementById('canvas2'); var ctx = Can1.getContext("2d"); Can1.width=960; Can1.height=720; …
Ashisha Nautiyal
  • 1,389
  • 2
  • 19
  • 39
1
vote
0 answers

javascript Image Data Object to Image Object (Trying to fill() with image data)

What i am trying to do is context.createImageData(xxx,xxx) then take that image data and manipulate it, then context.createPattern(imagedata, 'repeat') with the image data to fill in my drawn object with the image data that I procedural made. The…
Phara0h
  • 11
  • 2
1
vote
3 answers

html5 getImageData then putImageData results in fading image

I'm very new to Html5 and I was wondering if someone could shed some light on this: