Move your code for the Bitmap handling into the block of the ViewTreeObeserver. Before this code block will be executed the width and height are 0.
frame.getViewTreeObserver().addOnGlobalLayoutListener(
new OnGlobalLayoutListener(){
@Override
public void onGlobalLayout() {
width=frame.getWidth();
height = frame.getHeight();
Bitmap bitmap=BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
Bitmap scaled=Bitmap.createScaledBitmap(bitmap, width, height, true);
image.setImageBitmap(scaled);
image.setOnTouchListener(new myTouchListener());
frame.getViewTreeObserver().removeGlobalOnLayoutListener( this );
}
});