Sven's got it covered, but I'd just like to post a little code example, this takes an image and crops it left and right, but it takes the image as a memblock then makes a new memblock with just the cropped data. I'm using it for cheap variable width fonts - so I can use image width when incrementing the X position when pasting letters. I think it's a good idea to know memblock images, even if you do use the excellent ImageKit.
function img_cropwidth(img)
if memblock exist(1)=1 then delete memblock 1
if memblock exist(2)=1 then delete memblock 2
make memblock from image 1,img
wid=image width(img)
hig=image height(img)
dep=32
xa=0 : xb=wid-1
scanned=0
for x=0 to wid-1
scan=0
for y=0 to hig-1
pos=12+(((y*wid)+x)*4)
b=memblock byte(1,pos+0)
g=memblock byte(1,pos+1)
r=memblock byte(1,pos+2)
a=memblock byte(1,pos+3)
if a>0
scan=1
endif
next y
if scan=1 then xb=x : scanned=1
if scan=0 and scanned=0 then xa=x
next x
nwid=(xb-xa)+1
sz=((hig*nwid)*4)+12
make memblock 2,sz
write memblock dword 2,0,nwid
write memblock dword 2,4,hig
write memblock dword 2,8,dep
px=0
py=0
for x=xa to xb
py=0
for y=0 to hig-1
pos=12+(((y*wid)+x)*4)
pos2=12+(((py*nwid)+px)*4)
b=memblock byte(1,pos+0)
g=memblock byte(1,pos+1)
r=memblock byte(1,pos+2)
a=memblock byte(1,pos+3)
write memblock byte 2,pos2+0,b
write memblock byte 2,pos2+1,g
write memblock byte 2,pos2+2,r
write memblock byte 2,pos2+3,a
inc py,1
next y
inc px,1
next x
delete image img
make image from memblock img,2
endfunction