Canvas

Canvas Tutorials

Canvas Methods and Properties

HTML canvas ImageData data Property

HTML canvas ImageData data Property

 

 

The data property is used to return an object that contains image data of the specified ImageData object. Every pixel in the ImageData object has four pieces of information. These are:-

  1. R - The color red (from 0-255)
  2. G - The color green (from 0-255)
  3. B - The color blue (from 0-255)
  4. A - The alpha channel (from 0-255; 0 is transparent and 255 is fully visible)

 

Syntax:-

 

Its syntax is:- imageData.data;

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas