Questions tagged [getimagedata]

a function to access the raw pixel data of HTML5 canvas element.

a function to access the raw pixel data of HTML5 canvas element.

For more information see the MDN documentation of CanvasRenderingContext2D.

211 questions
0
votes
1 answer

getimagedata() to particle texture three.js

I'm trying to do this: getimagedata() from diferent positions of the same canvas elemente and make each of the imagedata chunks to be the texture of individuals particles in a particle system. I dont want the all the system to have the same texture,…
Memo Lestas
  • 393
  • 1
  • 4
  • 13
0
votes
1 answer

JavaScript Color Detection w/ getImageData on Canvas

I'm having trouble with the getImageData function. I'm trying to make a program that detects when you hit the color red and pops up an alert box. I've written a collision detection function called "collideTest", and though I can't find any problems…
trevnewt
  • 131
  • 1
  • 3
  • 9
0
votes
1 answer

“Cross-Origin Resource Sharing policy” Between Subdomains in JS?

I have a Tumblr theme that includes a canvas script. The Cross-Origin Resource Sharing policy doesn't allow context.getImageData() to work. Script is located at user.tumblr.com, images are located at static.tumblr.com. Is there any solution for…
Digerkam
  • 1,826
  • 4
  • 24
  • 39
0
votes
1 answer

find rgb value of a patch of canvas

So I have my canvas and I take some image data from it like so: // assume canvas already has an image on it var data = ctx.getImageData(0, 0, 20, 20); now in the data I have a lot of nonsense of which I have no idea what any of it really is because…
Jacksonkr
  • 31,583
  • 39
  • 180
  • 284
0
votes
1 answer

Why is my context.getImageData() call illegal?

I have been playing around with a very simple HTML5/Canvas based drawing app, just for the browser. I am setting it up as a proof of concept to play around with different programmatic drawing effects and such. However, I running into an issue,…
Ken Bellows
  • 6,711
  • 13
  • 50
  • 78
0
votes
1 answer

extract features from image database in simpleCV

I am new to python, therefore I need some help: AIM: I have an image database containing 10 images. I want to use a hue feature extractor to extract the hue from each image and store it in a list and compare the list with hues from other images not…
user1665514
  • 69
  • 2
  • 7
0
votes
1 answer

context.getImageData() on https?

I have the same problem with this post context.getImageData() on localhost?, but instead of localhost I am working on a https site so this provokes the problem with the canvas. It there a solution for this case?
novellino
  • 1,069
  • 4
  • 22
  • 51
-1
votes
1 answer

Why does new ImageData from new Uint8ClampedArray create a black and white image

I am stitching 2 images together to create a single image. Overlaying might be a better term. The first image is the following. The second image is the following: After doing some canvas magic, I am able to overlay the final image using TWO canvas…
ChannelJuanNews
  • 406
  • 3
  • 11
-1
votes
1 answer

How to draw vertical lines on canvas directly with ImageData?

I don't understand why the lines are diagonal and unevenly dotted. I'm trying to draw straight vertical lines. 'use strict'; function loadImage(url) { return new Promise(r => { let i = new Image(); i.onload = (() => r(i)); i.src = url;…
GirkovArpa
  • 4,427
  • 4
  • 14
  • 43
-1
votes
1 answer

In Python 3.8, how do I load image data from a file for inclusion ina JSON object?

I'm using Python 3.8. I want to get image byte data into a JSON object. So I tried this with open(os.path.join(dir_path, "../image_data", "myimg.jpg"), mode='rb') as img_file: image_data = img_file.read().decode("utf-16") my_json_data = { …
Dave
  • 15,639
  • 133
  • 442
  • 830
-1
votes
1 answer

GetImageData return some random zeros from nowhere

I am building a chrome extension that can read web pages images' rgb into separate arrays. However, there are some zeros from no where in the middle of each array(though the first few pixels' rgb readings are correct). Suspicious 0s. All my image's…
ykeeky
  • 1
  • 1
-1
votes
1 answer

extract scanned image data using node.js

Hello I am facing a problem, I have a form which have multiple questions, boolean questions and questions which have answers in text fields. User will fill the form, scan it and upload it to node.js server. the node server will identify answer of…
-1
votes
1 answer

I'm having issues of Low memory Memory. Every time memory grows when push the view. I am using Xcode 6.1

I'm having issues of Low memory Memory. Every time memory grows when push the view. When i run the Instruments i saw it is ImageIO_PNG_Data, which takes the grows lots of memory every time i push the view. My old application is working fine, but…
Sam
  • 1
  • 2
-1
votes
1 answer

get pixel colour in javascript

This might be a very basic question but as I am a newbie when it comes to javascript I can't figure out the right way to solve my issue. I need to do an if statement which checks the pixel colour and if it's black - do something if it's not - do…
TomasJ
  • 289
  • 8
  • 21
-1
votes
1 answer

Canvas Drawing gets blurred after calling getImageData() method on Chrome

The original canvas renderings are getting blurred after i call getImageData() and copy its content to another canvas on GOOGLE CHROME. Anyone facing similar problems?
cheekujha
  • 781
  • 4
  • 12
1 2 3
14
15