An investigation into the parallel implementation of JPEG for image compression