LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.68k stars 152 forks source link

Handle unknown background formats gracefully #174

Open argv-minus-one opened 5 years ago

argv-minus-one commented 5 years ago

One of the image formats supported by Finder for the background image is, somewhat surprisingly, PDF. That's a vector graphics format, so this could be used to make a single background image that scales cleanly to any screen resolution, without having to make a separate @2x version of the image.

Problem: appdmg chokes when trying to use a PDF as the background image, because image-size doesn't understand that format (and PDF doesn't have a pixel size anyway).

This PR does two things to help with that problem:

sindresorhus commented 4 years ago

It would also be useful to update the readme to mention that PDF is supported as background.

Here:

background (string, optional) - Path to your background

And here:

https://github.com/LinusU/node-appdmg#retina-background