Questions tagged [imagedata]

The ImageData browser interface/API allows JavaScript to directly access pixel data in a <canvas> element. The data is represented as a one-dimensional array with RGBa values stored in separate indices.

65 questions
0
votes
1 answer

ImageData is different when getting one pixel

I am making a 2d light ray simulator with html canvas and i was creating a 1 pixel ImageData every time a ray moved so when i made it so it only created one at the start, it stopped working normally. The top is the old version that works and the…
GiantBooley
  • 198
  • 3
  • 9
0
votes
0 answers

How to display a raster/hyperspectral image in Pyqt5 canvas?

I want to display/embed a hyperspectral image (having bands around 200)in my user interface which I'm developing using python (pyqt5 + Qt Designer). It's working totally fine with 2d normal image but with hyperspectral image its not working. I…
0
votes
0 answers

Is there a way to create an image blob from a bytearray converted with atob()?

THE PROBLEM I'm trying to learn how bytearrays and bufferarrays work, so I'm just playing with the language a bit. I'm wondering why I can't seem to convert image data into bytearrays from a blob, and then create a new blob using that bytearray that…
0
votes
0 answers

Find a string stored in a image data type in sql

I have data stored in image data type in a sql database. The image contains few strings. I want to search for a string in the image data stored
0
votes
1 answer

what does "imageData[ (width + height * stageHeight) * 4 -1 ]" mean?

dotPos(density, stageWidth, stageHeight) { const imageData = this.ctx.getImageData(0, 0, stageWidth, stageHeight).data; const imageData = this.ctx.getImageData(0, 0, stageWidth, stageHeight).data; const particles = []; let i = 0; …
sunub
  • 13
  • 2
0
votes
1 answer

where does leaflet store the tiles for a tilelayer

I have an elevation tilelayer in Leaflet and would like to access the individual tile images in order to access their elevation data via the imageData object Where are the tile images stored within Leaflets tileLayer object?
backspaces
  • 3,802
  • 6
  • 34
  • 58
0
votes
1 answer

Array of ImageData data is not equal to array literal

var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); var img = new Image(); img.crossOrigin = 'anonymous'; img.src =…
0
votes
1 answer

Can't convert base64Image to ImageData object

I'm currently trying to convert a base64Encoded string (representation of an image) into an ImageData object in Javascript. However, this comes back with an error: Uncaught InvalidStateError: Failed to construct 'ImageData': The input data length…
Squiggs.
  • 4,299
  • 6
  • 49
  • 89
0
votes
0 answers

C# on linux: FFmpeg (FFMediaToolkit) MediaOutput..Video.AddFrame(FrameToImageData(ImageData)) causes program to exit with code 139

In my C# program I have instance of MediaOutput from FFMediaToolkit. It is initialized like this: MediaOutput buffer = MediaBuilder.CreateContainer(videoPath).WithVideo(new VideoEncoderSettings(width: width, height: height,…
Jan Černý
  • 1,268
  • 2
  • 17
  • 31
0
votes
2 answers

adding metadata to image's content WITHOUT saving the file. in PHP

given an image file path, I want to get its content - than add metadata to that content (either EXIF, IPTC, XMP etc.) and then display that image's content, with that metadata included (probably in base64 format), in an HTML tag without saving the…
rami300
  • 69
  • 9
0
votes
1 answer

How to import image dataset from folder with tensorflowio

Hi I have image dataset from sharing folder. The dataset path like this: /media/sharing_folder/data and data folder has two subfolder which are "masked", "unmasked". I try to import data like this: data = [] def create_data(): for category in…
0
votes
0 answers

How to get any type of images creation date and time in php

I am trying to get the created date and time of an image using php.I am using php 7.1. After lots of searching and RND I got one php function named exif_read_data to get the details of an image. But using this library I am not getting any desired…
Fokrule
  • 844
  • 2
  • 11
  • 30
0
votes
0 answers

Cannot assign value of type 'Foundation.Data' to type 'Appname.Data'

I have code for fetching the image data.The same code works fine in other projects but in this project i am getting this error.The code which causes the error is as given below: func imagePickerController(_ picker: UIImagePickerController,…
Saranya
  • 595
  • 2
  • 7
  • 19
0
votes
0 answers

File Object to ImageData Conversion not producing correct pixels (JavaScript)

I am trying trying to convert an uploaded file object (jpg, png) into an ImageData in JavaScript. This is how I do it so far: var fileReaderObj = new FileReader(); fileReaderObj.onload = function (ev) { var fileDataURL = ev.target.result; …
Ethan Yim
  • 85
  • 1
  • 6
0
votes
1 answer

How to use imageData in animations

I have an object that stores imageData with a createImageData() function. I do not want to create any more imageDatas, but I want the data to be cleared each frame. How do I do this?