Questions tagged [pixel-manipulation]
54 questions
1
vote
1 answer
Which is faster -- stacking canvases or pixel manipulation?
I'm making a little Tetris clone using some of the HTML 5 features, and I've come to a bit of a dilemma.
My tetrominos aren't composed of blocks -- they have shading and shadows that depend on the rotation and thus each is its own image. Which…

Nick
- 5,228
- 9
- 40
- 69
1
vote
1 answer
How to print current pixel of an QImage?
I have an RGB888 format qImage defined as follows:
int sizeX = 300; int sizeY = 300;
QImage img = QImage(sizeX, sizeY, QImage::Format_RGB888);
I wish to print current pixel of img one by one. So, I followed the example here:`
for(int i=0; i

Efe Şafak
- 25
- 4
1
vote
1 answer
GrayScale (8bit per pixel) Image Pixel Manipulation in Java
I've heard that the data in gray-scale images with 8-bits color depth is stored in the first 7 bits of a byte of each pixel and the last bit keep intact! So we can store some information using the last bit of all pixels, is it true?
If so, how the…

ehsun7b
- 4,796
- 14
- 59
- 98
1
vote
1 answer
Linear interpolation on canvas
I'm trying to understand how image resampling methods work. I've read/watched several pages/videos and I think I got the idea. However, I couldn't find any working example on how to implement it. So I thought I should start with the basics: nearest…

akinuri
- 10,690
- 10
- 65
- 102
1
vote
1 answer
Memory Management of update Method in Texture Pixel Manipulation
How is the array of pixels, that is passed to the update method in the Texture class (SFML), managed memory-wise? These are some of my guesses:
A weak pointer is saved inside the texture instance; which means that it is necessary to keep a pointer…

Dincio
- 1,010
- 1
- 13
- 25
1
vote
2 answers
Pixel manipulation with FabricJS
I'm using FabricJS v1.5.0 and have a problem when manipulated pixel by pixel on the canvas.
this.canvas = new this.fabric.Canvas('canvas');
let imageData = this.canvas.contextContainer.getImageData(0, 0, this.canvas.getWidth(),…

Kevin Nascimento
- 25
- 6
1
vote
1 answer
Rotate the pixels around a given coordinate
I've made a solar system animation some time ago and I'm rewriting it now. I'll be adding gravity effect to masses, and to make the effect visible, I've turned the background into a grid.
I'll be adding two different effects; pinch and twirl. I'm…

akinuri
- 10,690
- 10
- 65
- 102
1
vote
1 answer
How to get pixel position
I feel really dumb asking this, but bear with me. I know about the formula to get the pixel position in a linear array:
pos = (y * width + x) * 4
which works fine. jsFiddle. But before the image/table is linearized, same formula doesn't work. You…

akinuri
- 10,690
- 10
- 65
- 102
1
vote
2 answers
C++ Converting image to integer array
How would I go about converting the pixels in an image (.png file) to an integer array, where each pixel is converted to its ARGB integer equivalent? Not a 2D integer array by the way, a 1D one (where access is through array[row*width+col]).
Thanks.

jonathanasdf
- 2,844
- 2
- 23
- 26
1
vote
1 answer
Directly set every point in path's alpha channel on canvas
Let's say I have a canvas with stuff on it, and I want to carve an ellipse in it's center, whose all of the pixels have an alpha of 0, to let everything behind the canvas to pass through, and given that previously the area now filled by the ellipse…

towc
- 1,983
- 2
- 22
- 36
1
vote
1 answer
Recursion expensive for Firefox
EDIT: Only occurs in Firefox! (I'm using 22.0) See the browser comparison at the bottom.
I'm trying to create a 'fade to black' effect on the canvas by copying the pixel data and progressively changing the alpha values from 255 to 0 (the background…

LittleJohn
- 183
- 2
- 10
1
vote
0 answers
iPhone how to create splash color functionality
I am trying to learn image manipulation and one of the techniques i want to execute is the splash color functionality... which is something like the "Color Splash" app https://itunes.apple.com/us/app/colorsplash/id304871603?mt=8
Specifically I want…

Umer Hassam
- 1,332
- 5
- 23
- 42
1
vote
1 answer
Get X,Y Coordinate of Zoomed Image Pixels - KineticJs / HTML5 Canvas Image
I am developing an application that allows users to upload photo, during uploading of the photo, the application performs detection on the server to get the photo’s region of interest (x, y, width and height), and return it to the client…

Syma
- 574
- 1
- 4
- 11
1
vote
1 answer
OpenGL Texture Rate too slow?
I have a 5 megapixel texture that I am having trouble updating. The texture is displayed on a rectangle not dissimilar to a video stream.
The OpenGL commands execute quickly, but the real texture update rate is sub optimal, perhaps only 3 actual…

Mikhail
- 7,749
- 11
- 62
- 136
1
vote
0 answers
How do I simulate a copy machine transition in iOS?
Apple has a copy machine transition effect that gradually transforms an image into another. Since transitions are not available in iOS I'm looking for an alternate method in achieving this effect or something similar. I'm collecting all of my…

MyNameIsKo
- 2,171
- 1
- 15
- 24