Extract psnr checks into a separate function
Copy reference picture instead of decoding it twice
Support resizing on gray & nrgba images