<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_image_to_file(img_path, file_path):
 """ Expects images created by from_from_file_to_image """

    img = Image.open(img_path)
    data = numpy.array(img)
    data = numpy.reshape(data, len(img.getdata()) * 3)
    to_remove = data[len(data) - 1]
    data = numpy.delete(data, xrange(len(data) - to_remove, len(data)))
    data.tofile(file_path)