I hadn't thought of using a memblock! I'll play with it and report back. Thanks!
First off I'm sorry for pretty much just stealing your line of code where you set the memblock data. Works like a charm as long as the x is positive. For my purposes I'm not too worried about getting it to work with negative x's for now.
function copyImageOntoImage(subImage, image, x, y)
if (x > 0)
subImageMemblock = CreateMemblockFromImage(subImage)
imageMemblock = CreateMemblockFromImage(image)
width = GetMemblockInt(imageMemblock, 0)
height = GetMemblockInt(imageMemblock, 4)
size = GetMemblockSize(imageMemblock)
subWidth = GetMemblockInt(subImageMemblock, 0)
subHeight = GetMemblockInt(subImageMemblock, 4)
subSize = GetMemblockSize(subImageMemblock)
for d=0 to subHeight - 1
for a=0 to subWidth - 1
SetMemblockInt(imageMemblock, ((d + y) * width * 4) + ((a + x) * 4) + 12, GetMemblockInt(subImageMemblock, (d * subWidth * 4) + (a * 4) + 12))
result = CreateImageFromMemblock(imageMemblock)
result = -1
Go ahead. Walk into Mordor.
Ball State University - Computer Science Major