1. A computer-implemented method for downscaling an image, the method comprising: decoding a plurality of pixel lines of a source image; storing the plurality of decoded pixel lines in a queue; determining whether the queue contains a sufficient number of decoded pixel lines to perform interpolation between at least two of the decoded pixel lines, and in a case that it is determined that the queue contains a sufficient number of decoded pixel lines to perform interpolation, interpolating at least two of the plurality of decoded pixel lines in the queue to form one or more scaled pixel lines; and deleting one or more of the decoded pixel lines in the queue by performing a pop operation on the queue.