Question: I have created an EC2 instance (called A), and want to test the open source NerdDinner on it.

After having created and RDS instance for my database and created a database, how can I deploy my NerdDinner to the A instance?

And after that, I want to create two other EC2 instances (B,C) that can run the same app with the same database. Is that what Load balancing is doing?

If I update the app, do I have to deploy the app each time on the three instances (A,B,C)?

Answer: 
You can use "fitXY" to scale an ImageView:

```
<ImageView android:layout_width="150dp" 
           android:layout_height="150dp"
           android:scaleType="fitXY" />

```

You can set the source of the ImageView programmatically.
The following piece of code will do the trick ;)

```
public static Bitmap decodeFile(File f, boolean goodQuality){
        try {
            //Decode image size
            BitmapFactory.Options o = new BitmapFactory.Options();
            o.inJustDecodeBounds = true;
            BitmapFactory.decodeStream(new FileInputStream(f),null,o);

            //The new size we want to scale to
            final int REQUIRED_SIZE=100;

            //Find the correct scale value. It should be the power of 2.
            int scale=1;
            if(!goodQuality){
                while(o.outWidth/scale/2>=REQUIRED_SIZE && o.outHeight/scale/2>=REQUIRED_SIZE)
                    scale*=2;
            }
            //Decode with inSampleSize
            BitmapFactory.Options o2 = new BitmapFactory.Options();
            o2.inSampleSize=scale;
            return BitmapFactory.decodeStream(new FileInputStream(f), null, o2);
        } catch (FileNotFoundException e) {}
        return null;
    }

```