A hybrid randomized algorithm for image compression