Pixelpointer in carve_path

Does this line work as intended (moving the next pixels r value into the first pixel);
pixelpointer[offset].r = pixelpointer[(offset+1)].r;

Assuming, that pixelpointer has been declared as; “struct pixel *pixelpointer = img->pixels;”

Or am I sitting here, wondering why my carving does not work, because I can’t use the pointer like that?


I guess, you actually don’t want to move the r value into the first pixel but in the one at position offset with this code snippet, right? But if this is your intention the line should do the job.

best wishes
Lisa :slight_smile:

Yes, thank you. That was my intention.