staff0rd Posted March 7, 2016 Share Posted March 7, 2016 I don't think this is specific to Phaser so I'll post it here. In this example an image is loaded and displayed. And here's that image direct, which displays as the same size it's displayed in the example, which is why this doesn't seem specific to Phaser. Now if I download that image and open it with an image viewer, the image is displayed smaller than the browser is displaying it! This means the image is being scaled up somehow in the browser, and results in images looking a little blurry due to what I assume is anti aliasing. Why is this happening, and how do you get around it? In my Phaser based game I've determined that the images look far better if I export them 2x the size I need them, and use phaser to scale them to 0.5. This however means I need to add an extra scaling call to every sprite I instantiate. Quote Link to comment Share on other sites More sharing options...
mattstyles Posted March 8, 2016 Share Posted March 8, 2016 I havent looked at the example but have you checked the dpi of the image? I dont think this is the issue you're seeing but it can cause different software to display images at different pixel sizes. edit: actually I did download the image as I became curious, the image is something like 600x500, when I open it up in preview its the exact same size as the browser displays it. Suggests that this possibly some issue with whatever software you are using to open the image, not with the image itself, nor with the browser. Quote Link to comment Share on other sites More sharing options...
staff0rd Posted March 8, 2016 Author Share Posted March 8, 2016 Hmm, strange. If I open it with IrfanView or GIMP, it's smaller. If i open it with inkscape its the same size as the browser. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.