It came out fine for me. Are you clearing the screen before getting the image? I Modified the code slightly for easy viewing and exiting.
My understanding is that the 'GetImage' command grabs everything inside the specified x,y pixel range from the backbuffer. If there is something else being drawn, this could be the issue.
This is the setup file:
rem
rem ----------*** AGK Setup File ***----------
rem
rem NOTE: This file is used by the core binary
rem to configure basic setup values required
rem prior to execution of the AGC source code.
rem No spaces allowed beyond this point:
rem Window title (delete to hide window bar)
title=My AGK Application
rem Specify the initial device width
width=256
rem Specify the initial device height
height=256
// Specify whether to use fullscreen mode
fullscreen=0
...and this is a modified version of your snippet:
SetVirtualResolution(256,256)
Do
Sync()
for i = 0 to 255
// Column 1 - Red to Yellow
drawline( 0,i,16,i,255,i,0)
// Column 2 - Yellow to Green
drawline( 16,i,32,i,255-i,255,0)
// Column 3 - Green to Cyan
drawline( 32,i,48,i,0,255,i)
// Column 4 - Cyan to Blue
drawline( 48,i,64,i,0,255-i,255)
// Column 5 - Blue to Magenta
drawline( 64,i,80,i,i,0,255)
// Column 6 - Magenta to Red
drawline( 80,i,96,i,255,0,255-i)
// Column 7 - Yellow to Cyan
drawline( 96,i,112,i,255-i,255,i)
// Column 8 - Cyan to Magenta
drawline( 112,i,128,i,i,255-i,255)
// Column 9 - Magenta to Yellow
drawline( 128,i,144,i,255,i,255-i)
// Column 10 - Black to White
drawline( 144,i,160,i,i,i,i)
// Column 11 - Black to Red
drawline( 160,i,176,i,i,0,0)
// Column 12 - Black to Green
drawline( 176,i,192,i,0,i,0)
// Column 13 - Black to Blue
drawline( 192,i,208,i,0,0,i)
// Column 14 - Black to Yellow
drawline( 208,i,224,i,i,i,0)
// Column 15 - Black to Cyan
drawline( 224,i,240,i,0,i,i)
// Column 16 - Black to Magenta
drawline( 240,i,256,i,i,0,i)
next i
// Press Escape Key To Exit
If GetRawKeyState(27)>0 Then Exit
Loop
thisImage = getImage( 0 , 0 , 256 , 256 )
saveImage( thisImage , "Gradients.png" )
End
I've attached the image that this generates for me as cross-reference.
|,,|, (Dead Knot Broken) ,|,,|