I would like to have a function that randomly permute the value of each pixel according to the dimensions of the channels in the image using PIL.
I tried some methods but I didn't get the right result or it's too slow.
EDIT
Example: For the pixel 1 suppose that the values are R: 42 G: 13 B:37, we apply the function and for this pixel the new values will be R: 13 G: 42 B:37 (for this pixel the permutation was 0,1,2 -> 1,0,2) For 2 it will be another random permutation for example 0,1,2 -> 2, 1, 0 etc ...