This is a true bilinear resampling algorithm. Because it's purly done in Lingo it's rather slow compared to resampling done by Xtras. The benefit is it's free.
-- return the original image if the scale factor is 1
if newImage.rect = theImage.rect then return theImage
-- the look-up table for the original image (done for speed purposes)
-- this shaves off 600 milliseconds from my 320x240 test image
listX = []
listY = []
repeat with x = 0 to oldWidth
repeat with y = 0 to oldHeight
listY.add(theImage.getPixel(x,y))
end repeat
listX.add(listY)
listY = []
end repeat
-- get the ratio between the old image and the new one
xScale = (oldWidth) / float(newWidth)
yScale = (oldHeight) / float(newHeight)
-- draw each pixel in the new image
repeat with y = 1 to newHeight