(condensed)
0=263435&1=1c2524&2=141613&3=e0f09&4=171a13&5=282d27&6=36413b&7=3a4b45&8=32424f&9=253a3f ...
(exploded)
0=263435
1=1c2524
2=141613
3=e0f09
4=171a13
5=282d27
6=36413b
7=3a4b45
8=32424f
9=253a3f
...
where the first number is an index in the image, starting at the top left corner and going down. So, if the image has a height of 137 pixels then an index value of 159 would correspond to (x, y) = (1, 22) by these equations $x = floor($index/$height); $y = $index - ($x*$height); (first row and column are zero, so its actually the 23rd row and 2nd column).
Anyways, it sort of works, but I can't figure out why the image I piece back together has artifacts.
Here is the original image:

Here is the generated image:

I've already checked the database values for some of the funky pixels and the right value was stored, but it doesn't set the right color to the image. Also, it doesn't matter how many times I run the scripts, the artifacts end up in the same spots every time. Would this be a memory problem?
Any help would be appreciated. Thanks.
