Fix: length compare invalid for scaled down copy of image file