Skip to main content
Participating Frequently
May 31, 2017
Answered

HTML5 - Sampling color from hidden image/video

  • May 31, 2017
  • 1 reply
  • 802 views

I have a setup of two images, one in front of the other. When the user clicks on the front image I want to sample the same pixel in the background image.

In Actionscript 3 i used the bitmapData class to do this.

In the HTML5 document I can get the pixel color of the entire canvas but only the visible pixels. Is there a way to sample the image in the background that is not visible on the canvas? Maybe create a second context for the other image? Preferably without flipping images.

This topic has been closed for replies.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
May 31, 2017
rymbrantAuthor
Participating Frequently
May 31, 2017

"Document" does not exist in Adobe Animate CC.  Is there a way to reference it?

kglad
Community Expert
Community Expert
May 31, 2017

document