You can do it like this:
func shift(im: Image):
# Copy image except last row of pixels
var sub = im.get_rect(Rect2(0, 0, im.get_width(), im.get_height() - 1))
# Paste part of image one pixel lower
im.blit_rect(sub, Rect2(0, 0, sub.get_width(), sub.get_height()), Vector2(0, 1))
# Write line of white pixels at the top:
# I don't know what you want them to be, there might be better way depending on what you want
im.lock()
for x in im.get_width():
im.set_pixel(x, 0, Color(1,1,1))
im.unlock()