Codenburger19 Posted September 2, 2015 Share Posted September 2, 2015 Hi, I have a very strange problem with Phaser. When I save a new image from Photoshop CC 2015, then use this code in phaser to load an image: this.load.image('logo', 'images/rielaiz-logo.png'); I then use this code to load the image as a sprite: this.rielaizLogo = this.add.sprite(158, 157, 'logo');this.rielaizLogo.anchor.setTo(0.5, 0.5); All existing images work just fine. Please help. Link to comment Share on other sites More sharing options...
rich Posted September 3, 2015 Share Posted September 3, 2015 Are you sure it's definitely a PNG? Attach one to your reply so we can check it. Link to comment Share on other sites More sharing options...
Skeptron Posted September 3, 2015 Share Posted September 3, 2015 The fact that the image was exported with Photoshop should have no impact at all. Did you check the weight of your image? If it's too big, maybe you don't see it because it takes ages to load. Link to comment Share on other sites More sharing options...
rich Posted September 3, 2015 Share Posted September 3, 2015 I agree - it's either the wrong format (i.e. you're trying to load a PSD or something) or too large for your GPU to handle. Maybe thousands of pixels in size. Link to comment Share on other sites More sharing options...
Mattward Posted September 3, 2015 Share Posted September 3, 2015 I had this exact problem when I was using Dropbox to store my files. I found that if you replace a file it won't work.. However if you save it as a new file, delete the old one and rename the new one to your desired name, it will work? Link to comment Share on other sites More sharing options...
wayfinder Posted September 4, 2015 Share Posted September 4, 2015 I agree - it's either the wrong format (i.e. you're trying to load a PSD or something) or too large for your GPU to handle. Maybe thousands of pixels in size. With Photoshop, it could also ALWAYS be some color profile/color mode problem, like weird off-spec CMYK PNGs Link to comment Share on other sites More sharing options...
mizgiwir Posted October 15, 2015 Share Posted October 15, 2015 I think I'm getting this issue too whatever it is...To illustrate how weird this problem is:If I grab all the files for the "Making your first Phaser Game" tutorial, and, say, load up part9.html from that?Everything works fine!If I then go into the assets folder, open sky.png into Photoshop and make any kind of change to the image (like, say, grab one of the colors already in the image and paint it somewhere else in the picture) and then Save (not even Save-As-- just Save.) and-- having done nothing else -- then try to open part9.html again?Nothing loads.I can get the game to run again if I comment out the line:game.load.image('sky', 'assets/sky.png');So... it's just loading that updated image that's the problem.If I replace the file with an 'original' version, and repeat the same process with, say, MSPaint though, the updated image works fine.So it's definitely something Photoshop is doing to the image that makes it no longer work in a Phaser game... but I have no idea what that might be. Link to comment Share on other sites More sharing options...
Dower Posted October 16, 2015 Share Posted October 16, 2015 Try using Photoshop's SAVE FOR WEB option to save the PNG. Link to comment Share on other sites More sharing options...
Jaspery Posted October 16, 2015 Share Posted October 16, 2015 try testing an image converted through any 'online image converter' vs photoshop cc? or maybe try gimp if worst come to worst Link to comment Share on other sites More sharing options...
Recommended Posts