I am experimenting with procedural texturing, and I used a pixels[,,] array to hold the [x, y, color] data. The bulk of my code pre-existed, having originated in code that read the texture from a file. The result is depicted in the screenshot below.
Note the band on the left edge of the terrain. The code uses an interleaved VBO to represent vertex position, normal, and texture coordinates for a 256x256 height map. I procedurally generate a 512x512 texture image by blending images as a function of height. The band suggested that my texture coordinates were shifted along the x-coordinate by 4.0/255.0. I checked, and my texture coordinates were 0.0 all along the left edge and 1.0 all along the right edge. I thought I might have to fudge the result, so I did just that. I added 4.0/255.0 to the x-coordinate of each texture coordinate. The result looked perfect.
I decided to give it one more try. Instead of using a byte[,,] approach, I wrote directly (using unsafe code) in a System.Drawing.Bitmap so I could use the IntPtr form of the last argument of TexImage2D. The result, after I remembered to remove my fudge factor, was perfect.
Just this morning, I noticed the "width - Specifies the width of the texture image. All implementations support texture images that are at least 1024 texels wide" in, I think, all of the definitions of TexImage 2D. Could the 1024 proviso be the source of the problem I observed?