Correctly calculate image size with "unpack"