@OBese87
Though this doesn't address the motion blur attempt, it should give you a little information that should be useful in dealing with memblocks as images.
When using memblocks and images or bitmaps, there are a couple of things to keep in mind. When converting an image to a memblock, the memblock will inherit the current screen depth of your app. It's important to remember this when you are converting a memblock to an image or bitmap. If your screen depth is 16 but you create a memblock with a screen depth of 32, you are likely to crash your program if not your computer. Check out the following example. It will create a white square out of a memblock. The screen depth is 32. Try running the same example but switch the screen depth to 16 to see what happens.
sync on
sync rate 0
set display mode 800,600,32
rem put a few pixels in a memblock
wd=100
ht=100
dp=32
bytes=dp/8
header=12
pixdata=bytes*wd*ht
size=header+pixdata
make memblock 1,size
rem write header
write memblock dword 1,0,wd
write memblock dword 1,4,ht
write memblock dword 1,8,dp
rem populate memblock with white pixels
for pos=header to (header+pixdata)-bytes step bytes
write memblock dword 1,pos,rgb(255,255,255)
next pos
make image from memblock 1,1
cls
paste image 1,100,100
This example shows how easy it would be to create your own box command using a memblock. I wonder if it would be faster than using a series of lines or dots? If it were, gradations would be pretty quick.
In regards to pixel data, even though this example is 32 bit (4 bytes) the memblock will only use 3 bytes and leave one equal to zero. This last byte is reserved for an alpha channel, but DBC ignores this when converting between images. If you were to populate this 4th byte, DBC would read the entire value as a float and you would get unpredictable results.
32 bit is easy to deal with, 16 bit is a bit more difficult. The colors or rather the integers (DWORDS) that are generated using rgb(r,g,b) do not translate to the same value in a memblock representing a 16 bit image or bitmap. The colors are converted to WORDS or 2 byte values. Your graphics card determines how these values are converted. Look up 16bit RGB 565 or RGB 555 for a detailed explanation on the conversion.
Enjoy your day.