Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
How would I use Automatic Image Resolution. — Gideros Forum

How would I use Automatic Image Resolution.

mejonmejon Member
edited July 2015 in General questions
Hello,

I was wondering how would Automatic Image Resolution look like in code? If I had an image, (ball.png) would I type all of this in the code to get all the scale: for example:
ball@2.png
ball@3.png
ball@4.png

or what would I do to get scaling for android devices?

Comments

  • talistalis Guru
    edited July 2015 Accepted Answer
    No you are just typing the main image as ball.png in your main code.

    Gideros will automatically switch to the defined image.
    Of course do not forget that in project properties you should have to set image scaling algorithm and set the suffix and scale parameters.

    It is so much easy here is how to do it:
    http://docs.giderosmobile.com/automatic_image_resolution.html

    So step by step:
    1-Think about your resolution and scales and prepare your files. (Suppose you have ball.png with 150x200)
    2-Set those values in your project properties. (you can alter them if you want)
    suffix @2x and scale 2 , suffix @3x and scale 3 , suffix @05x and scale 0.5

    3-Add those file in your project.
    ball@05x.png -> 75x100
    ball.png -> 150x200
    ball@2x.png -> 300x400
    ball@3x.png -> 450x600


    4-In your code always use ball.png everywhere.
    5-Do not forget to repeat this procedure for all your files.

    That's how easy it is :D
Sign In or Register to comment.