{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/3376","labels_url":"https://api.github.com/repos/atom/electron/issues/3376/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/3376/comments","events_url":"https://api.github.com/repos/atom/electron/issues/3376/events","html_url":"https://github.com/atom/electron/issues/3376","id":115976737,"number":3376,"title":"Tray - NativeImage using incorrect image for devicePixelRatio @2x","user":{"login":"jstejada","id":1271509,"avatar_url":"https://avatars.githubusercontent.com/u/1271509?v=3","gravatar_id":"","url":"https://api.github.com/users/jstejada","html_url":"https://github.com/jstejada","followers_url":"https://api.github.com/users/jstejada/followers","following_url":"https://api.github.com/users/jstejada/following{/other_user}","gists_url":"https://api.github.com/users/jstejada/gists{/gist_id}","starred_url":"https://api.github.com/users/jstejada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstejada/subscriptions","organizations_url":"https://api.github.com/users/jstejada/orgs","repos_url":"https://api.github.com/users/jstejada/repos","events_url":"https://api.github.com/users/jstejada/events{/privacy}","received_events_url":"https://api.github.com/users/jstejada/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/atom/electron/labels/more-information-needed","name":"more-information-needed","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-09T21:58:41Z","updated_at":"2015-11-17T04:25:38Z","closed_at":"2015-11-17T04:25:38Z","body":"The issue I'm having is that NativeImage is using a @1x image for the Tray when the `window.devicePixelRatio` is 2. I am creating my NativeImage by calling `NativeImage.createFromPath`\r\n\r\nI tried to force NativeImage to use the `@2x` image file by passing in the path to `NativeImage.createFromPath` that contains `*@2x`, but it just displays an empty image on the Tray.\r\n\r\nIf I change the filename of the 2x image to 1x it will display it without scaling. Also, if I just leave the `@2x` image file on the folder it will display nothing.\r\n\r\nBottom line, it is trying to get the 1x image no matter what even though `window.devicePixelRatio` is 2.\r\n\r\nIs this expected behavior?\r\n"},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/157264484","html_url":"https://github.com/atom/electron/issues/3376#issuecomment-157264484","issue_url":"https://api.github.com/repos/atom/electron/issues/3376","id":157264484,"user":{"login":"zcbenz","id":639601,"avatar_url":"https://avatars.githubusercontent.com/u/639601?v=3","gravatar_id":"","url":"https://api.github.com/users/zcbenz","html_url":"https://github.com/zcbenz","followers_url":"https://api.github.com/users/zcbenz/followers","following_url":"https://api.github.com/users/zcbenz/following{/other_user}","gists_url":"https://api.github.com/users/zcbenz/gists{/gist_id}","starred_url":"https://api.github.com/users/zcbenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcbenz/subscriptions","organizations_url":"https://api.github.com/users/zcbenz/orgs","repos_url":"https://api.github.com/users/zcbenz/repos","events_url":"https://api.github.com/users/zcbenz/events{/privacy}","received_events_url":"https://api.github.com/users/zcbenz/received_events","type":"User","site_admin":true},"created_at":"2015-11-17T04:25:38Z","updated_at":"2015-11-17T04:25:38Z","body":"@jstejada The data URL doesn't carry scale factor information so `nativeImage.createFromDataUrl` will always create images with 1x scale factor, I have created a new issue (#3463) for this."}}