90DPI PNG files
CaptFinn
Member Posts: 1,828
What happens if you use png files that are 90dpi? I remember reading GS want you to use 72dpi.
Comments
If you use any DPI other than 72, it will not create your actor the correct size. Try it. Make a background image the same size of your project and import it at 300DPI. Then drag the image into an actor and drop it on your scene. It won't be sized correctly.
ah ok. While on the subject.... and IM sure this has been asked 1000x. What are the main causes for a actor/image to display fuzzy. I noticed it wasnt fuzzy while viewing in the viewer. But it was in the adhoc.
Sub-pixel positions, sizes not divisible by 2/4, images that have been made larger than their actual size (in pixels) and very occasionally smaller.
But you can - as I'm sure you already know - simply then size it correctly, no need to go back into your image editor and change the resolution, you can just size the actor correctly.
My images are the sizes I need them to be. are you saying changing them by 1 pixel will make a difference? 90x90 90x91 90x180 90x183 which of these are bad? these are just examples. 90x90 and 90x180 = good? 90x91 and 90x183 =bad?
Yes.
90x91 and 90x183
GameSalad measures an actor's (=images) location from the centre of that actor, a whole pixel coordinate value for both X and Y will sit the actor on the junction between 4 pixels on a mobile device like an iPad - if the actor has an even number of pixels then each of the pixels in your actor are exactly lined up with each of the pixels on your device's screen - as you are sitting the junction between 4 image pixels exactly on the junction between 4 screen pixels.
Now make your actor 91 pixels wide (or high) rather than 90 pixels wide - the centre point doesn't change, it is still exactly in the middle of the actor, but now when you place the actor on a whole pixel coordinate value for both X and Y you are still sitting the actor on the junction of 4 (real world mobile device screen) pixels, but the part of the image that is sitting at this point is not the junction between 4 pixels in your image, but the centre of a single pixel . . . with all other pixels in the image also having to sit their pixels in sub-pixel (half way between two real pixels) positions, meaning if you have a white pixel that is sat between two screen pixels the device has no other choice but to share the values of the pixel between the two pixels, resulting in the image being smeared/blurred.
Hope that makes sense, might have to do a picture.
So to fix a 91 pixel wide actor/image, either crop it down to 90 pixels or position it on a sub-pixel position, both will cure the issue and give you optimal image fidelity.
I made you a picture:
An even 6 x 4 pixel image, it sits exactly on the (blue) screen pixels, the centre of the image (the image/actor's location) is in red.
Now look what happens when we take a pixel off the image/actor, so it's X dimension is odd, the the centre of the image is still in the middle of the actor and still is positioned on a whole pixel value - but now all the pixels are shared between adjacent screen (blue) pixels.
Solution: make the number even . . . or shift the image half a pixel along the X axis.
ok I got ya. thanks. Ill look at my images and see if there are any odd numbers.
Not just odd dimensions, but also check whether the actor is sat on a whole pixel value, check out the image below - the dimensions are even, 6 x 4, but the actor/image is sat at X=5.5, Y=5.5 (so on a sub-pixel dimension), look at the square in the top left of the image/actor (the one I've coloured red), it is sat between 4 screen (blue) pixels, so imagine it's value was 100% white, because it is shared between 4 screen pixels, each of those 5 pixels will get 25% white = blurring.
@DeepBlueApps has a PNG tool that will correct images like this. It adds or subtracts a single pixel to the image and can fix them in bulk.
Thank you.