JKirchartz / Glitchy3bitdither

client-side javascript image glitches
http://jkirchartz.com/Glitchy3bitdither
MIT License
44 stars 9 forks source link

Sort Functions not operating properly #15

Open JKirchartz opened 6 years ago

JKirchartz commented 6 years ago

It appears the sort functions, while sorting appropriately, are operating on the wrong sets of pixels or sub-pixel values (based on whether or not the algorithm uses Uint8array or Uint32array respectively) resulting in gradients from black to white. These sort operations should operate on pixel values resorting in sorting the colors specifically (and not the numbers that represent each channel value in the pixel.)