Sorry for the triple post, but I havem an update. I have fixed it, but it runs e...x...t...r...e...m...e...l...y slowly. Does anyone have any ideas on how I can fix that? Also, in the images that I am using [attached], I get this red noise at the bottom. Any ideas?
EDIT: Heh, forgot to attach the code:
sync on
dim pixel_1(500,300)
dim pixel_2(500,300)
dim r_1(500,300)
dim g_1(500,300)
dim b_1(500,300)
dim r_2(500,300)
dim g_2(500,300)
dim b_2(500,300)
load image "test_1.jpg",1
load image "test_2.jpg",2
make memblock from image 1,1
make memblock from image 2,2
width = 500
speed = 1
delete image 1
do
not = 1
current_read=12
current_write=12
for y = 1 to 300
for x = 1 to 500
pixel_1(x,y) = memblock word(1,current_read)
pixel_2(x,y) = memblock word(2,current_read)
r_1(x,y)=((pixel_1(x,y)/2048)&31)*8
g_1(x,y)=((pixel_1(x,y)/32)&63)*4
b_1(x,y)=(pixel_1(x,y)&31)*8
r_2(x,y)=((pixel_2(x,y)/2048)&31)*8
g_2(x,y)=((pixel_2(x,y)/32)&63)*4
b_2(x,y)=(pixel_2(x,y)&31)*8
current_read = current_read + 2
next x
next y
for y = 1 to 300
for x = 1 to 500
if r_1(x,y) > r_2(x,y) then r_1(x,y) = r_1(x,y)-1 ; not = 0
if r_1(x,y) < r_2(x,y) then r_1(x,y) = r_1(x,y)+1 ; not = 0
if g_1(x,y) > g_2(x,y) then g_1(x,y) = g_1(x,y)-1 ; not = 0
if g_1(x,y) < g_2(x,y) then g_1(x,y) = g_1(x,y)+1 ; not = 0
if b_1(x,y) > b_2(x,y) then b_1(x,y) = b_1(x,y)-1 ; not = 0
if b_1(x,y) < b_2(x,y) then b_1(x,y) = b_1(x,y)+1 ; not = 0
pixel_1(x,y)=((r_1(x,y)&248)*256)+((g_1(x,y)&252)*8)+((b_1(x,y)/8))
write memblock word 1,current_write,pixel_1(x,y)
current_write = current_write + 2
next y
next x
`if not = 1 then exit
make image from memblock 1,1
paste image 1,0,0
text 0,0,str$(r_1(1,1))+" "+str$(g_1(1,1))+" "+str$(b_1(1,1))
`wait 10
sync
cls
loop
paste image 2,0,0
"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949
