due to extremely similar code, image and imagebox have been merged.