New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
large sprite gets scaled down issue (iPad only) #94
Comments
Hi @florianhacker, |
Yes, I'm loading different files for each texture. It seems like this is more of an ios issue rather than a PIXI problem. I tried drawing a 4096x4096 image on a canvas without Pixi, the exact same affect happened! |
Crazy Days! Is that an ipad 3? as if not it may be because the max texture size for ipad 2 / 1 is somthin like 2048 x 2048 ? |
It's an iPad 4, displaying the image within an image tag works fine (without scaling issues), therefore I think it has to do with the canvas drawing context. According to Apple (http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html) Can this cause a scaling down issue as 4096x4096 increases the 5MP? Thanks |
All works fine with PNG/JPG sprite sheets up to 5 MP, everything above gets scaled down! My MovieClip now loads textures from 2 different spritesheets (5 MP each), I can notice a jerky movement when the MovieClip switches between the sprites. Is there a way to fix this? |
Happy to take a peek for you if there is a code example you dont mind sharing? |
That would be nice, here you go: https://dl.dropboxusercontent.com/u/4260558/pixi_test/index.html The page displays an image and a canvas element layered on top of each other. |
No way for me to test/confirm this, but I'm willing to bet this has to do with the 4096x4096 is the maximum texture size on the iPad, but when rendering it on the canvas, it doubles image sizes because the Of course, I could be completely wrong; check your console for warnings, and file a bug with Apple, if you can! |
I think it has to do with resource limits for encoding images. Hence it works fine on iPad4 (reportedly) but not on older (read lower memory).
From chapter Know iOS Resource Limits When iPad faces such image, it resamples it down as much to fit into available memory. |
It does not work on my iPad 4, I also think it has to do with backingStorePixelRatio. I tried implementing the drawImage method from http://www.html5rocks.com/en/tutorials/canvas/hidpi/ into PIXI but without success. I'm now using 2 sprites instead of one. |
Unfortunately this sounds like a device issue. 😦 |
It might be helpful to print warnings when textures go over a certain size. I think the safest max size is 2048x2048, according to WebGLStats. The texture size should be multiplied by Alternatively, it might also be as helpful to include a link to this issue in the documentation somewhere. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello!
I'm trying to solve the problem why my 4096x4096 sprite sheet gets scaled down to 50% on iPAD, but not on desktop. It's all working fine with a 2048x2048 sprite sheet!
Anyone ran into this issue or know how to solve this?
Thanks!
The text was updated successfully, but these errors were encountered: