You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
I 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.
If 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.
Bottom line, it is trying to get the 1x image no matter what even though window.devicePixelRatio is 2.
Is this expected behavior?
The text was updated successfully, but these errors were encountered:
hey @zcbenz , so after investigating further it turns out that the problem is with NativeImage.toDataUrl or NativeImage.createFromDataUrl which apparently don't take into account window.devicePixelRatio.
Basically, if i have icon@1x.png and icon@2x.png, and I do:
@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.
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 callingNativeImage.createFromPath
I tried to force NativeImage to use the
@2x
image file by passing in the path toNativeImage.createFromPath
that contains*@2x
, but it just displays an empty image on the Tray.If 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.Bottom line, it is trying to get the 1x image no matter what even though
window.devicePixelRatio
is 2.Is this expected behavior?
The text was updated successfully, but these errors were encountered: