Please help on copying pixels between two PImage

I have two images in two PImage the first image ( 1.jpg) consists of colored mosaics, while the second image also (2.jpg) consists only of a succession of pixels of a single color on a black background.
Well, what I’m trying to do and I still can’t quite figure it out, is to linearly copy a number of color pixels from the first image to the succession of single color pixels located in the second image, these successive pixels may not be linearly located In the second image, in fact they could form a curvilinear path. Some example would help me where with the mouse pointer you can select the beginning and end of the linear capture of pixels from the first image.

You’ll want to take a look at

Loadpixels and update pixels

Remember each pixel value holds an rgba value.

You can get the red of a pixel by using red(img.pixels[location])

The same can be done with the others

2 Likes

Hello,

I did an exploration of pixels and image in this topic:
https://discourse.processing.org/t/using-pixels-array-over-points-trying-to-moving-pixels-xy-off-screen-like-points/24309/2

It may give you some insight.

:)

Very thanks!!!the code train videos is the best!

Very thank!!the code train is the best option for learning manipulation pixels!!

1 Like