1. Download our Official Android App: Forums for Android!

Apps How to scale images correctly? (different sreens)

Discussion in 'Android Development' started by howtodoit, Feb 17, 2012.

  1. howtodoit

    howtodoit Lurker
    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    3
    Joined:
    Feb 17, 2012

    Feb 17, 2012
    3
    0
    25
    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 Member
    Rank:
    None
    Points:
    16
    Posts:
    58
    Joined:
    Dec 27, 2011

    Dec 27, 2011
    58
    5
    16
    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 Lurker
    Rank:
    None
    Points:
    5
    Posts:
    3
    Joined:
    Feb 19, 2012

    Feb 19, 2012
    3
    0
    5
    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

Loading...