1. Tablet future looks bright! Read more about: Alcatel Xess | Samsung Galaxy View
    New Forums: Alcatel Xess | Samsung Galaxy View
    Dismiss Notice

How to scale images correctly? (different sreens)


Last Updated:

  1. howtodoit

    howtodoit New Member

    Hello.

    I started programming with LibGDX and i think this is the best library for Android Development but i have one problem. The Problem is with other screens and sizes. I have coded so much and game looks great on my phone (SGS II) but on my friend's phone (with the smaller screen) it looks not so good.

    Here is the screen:
    [​IMG]
    http://desmond.imageshack.us/Himg829/scaled.php?server=829&filename=skalowanie.jpg&res=medium

    As you can see there are pixels on the bombs on the smaller screen but on the bigger on there is no pixelization. How to solve this problem? How to make images more smooth not pixelated.

    Is there any way to fix it?

    Can anyone help?
    Thx!

    Advertisement
  2. powerpoint45

    powerpoint45 Well-Known Member

    Dont think this will help,but In android canvas to scale an image,you make a matrix and put it into the bitmap then use the scale method.
  3. Deco354

    Deco354 New Member

    In eclipse we are given 3 folders:

    Drawable-ldpi
    Drawable-mdpi
    Drawable-hdpi

    We place our images in mdpi then create smaller/larger copies of these images to be put into the ldpi/hdpi folders. Android's OS chooses the correct image automaticly based on the pixel density of the phone.

Share This Page