For anybody wondering – the correct DPI is about 508 for some reason.
If you've worked with PNG files under Photoshop, you may have noticed that a picture saved with exactly 72 dpi has 72.009 dpi when you close it and open it again. Using an integer multiple of 254 for the dpi prevents such a drift.