Hello,
Ok, so I'm using 'SYNCAIDIUS' MEMBLOCK IMAGE MANIPULATION LIBRARY V1.1' (which is really good if you haven't seen it) to make an image then manipulating the image and applying it to an object as a texture.
The problem:
When I make an image with a memblock it has a thin white line down the right and along the bottom sides (Pic. attached).
This is the code:
Global ResultTexture
ResultTexture = IMG_MAKE(Size,Size,RGB(255,0,0))
make image from memblock 9,ResultTexture
save image "test.jpg",9
Which uses this command from Syncaidius' library:
//Creates a new memblock image filled with the specified colour.
function IMG_MAKE(width as integer, height as integer, colour as dword)
mem = FREE_MEMBLOCK()
pixels = width*height
bytes = 4+4+4+(pixels*4) //width+height+depth+data
bytePos = 0
make memblock mem,bytes
width = (0<<24) + (0<<16) + (0<<8) + width
height = (0<<24) + (0<<16) + (0<<8) + height
depth = (0<<24) + (0<<16) + (0<<8) + 32
//write image info
write memblock dword mem,bytePos,width : inc bytePos,4
write memblock dword mem,bytePos,height : inc bytePos,4
write memblock dword mem,bytePos,depth : inc bytePos,4
//set every pixel in the image to the specified colour
for pixel = 1 to pixels
write memblock dword mem,bytePos,colour : inc bytePos,4 //set all pixels to the specified 'colour'
next pixel
endfunction mem
I've looked through it again and againg but I can't see a problem anywhere.
Any help appreciated!
Thanks,
BC