LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.67k stars 151 forks source link

Background image not spanning size of window #203

Closed jakerieger closed 2 years ago

jakerieger commented 2 years ago

My config:

{
    "title": "LucidAIO",
    "icon": "icon.icns",
    "background": "dmg_bg.png",
    "contents": [
        { "x": 412, "y": 205, "type": "link", "path": "/Applications" },
        { "x": 100, "y": 205, "type": "file", "path": "dist_electron/mac/Lucid AIO.app" }
    ],
    "format": "UDZO"
}

The window created is the size of my background image, so the dimensions are getting pulled correctly but the background image itself is super tiny and in the top left corner when it should span the size of the window

Screen Shot 2021-10-17 at 5 18 29 PM :

I've tried both .png and .jpg versions of my background image in case it was a weird export problem with Photoshop.

pzhlkj6612 commented 2 years ago

Hi.

I've tried both .png and .jpg versions of my background image in case it was a weird export problem with Photoshop.

Please check the resolution of your background image. You may need to change it to 72 DPI before exporting.

Same symptom: create-dmg/create-dmg#102

LinusU commented 2 years ago

Would be nice if we could read the resolution and emit a warning if it's not 72 🤔

jakerieger commented 2 years ago

DPI was 300. Changed to 72 and still doing the exact same thing. Will try some other things in Photoshop and update with any useful info

jakerieger commented 2 years ago

So I just created a new Photoshop document with the DPI set to 72 and dragged in my original image and exported that. That worked. Not sure why changing the DPI to 72 after creating it at 300 didn't work but oh well. Would like a warning for the DPI tho, I don't see it mentioned anywhere in the docs and would have never guessed that was the problem if someone hadn't commented it.