Optimize bufferedImage representation to device