change this code from:
// Set colors.
for (uint y = 0, i = 0; y < h; y++)
{
for (uint x = 0; x < w; x++, i++)
{
colors[i].x = r[x + img_x, y + img_y];
colors[i].y = g[x + img_x, y + img_y];
colors[i].z = b[x + img_x, y + img_y];
colors[i].w = a[x + img_x, y + img_y];
}
}
to:
// Set colors.
for (uint y = 0, i = 0; y < h; y++)
{
for (uint x = 0; x < w; x++, i++)
{
int offset = x + img_x + (y + img_y) * img_w;
colors[i].x = r[offset];
colors[i].y = g[offset];
colors[i].z = b[offset];
colors[i].w = a[offset];
}
}
}
Original issue reported on code.google.com by pope...@gmail.com on 6 Dec 2010 at 9:01
Original issue reported on code.google.com by
pope...@gmail.com
on 6 Dec 2010 at 9:01