The way I solved this problem is to create a bitmap from the drawing resource in question then transform it into a scaled bitmap with the desired size. I also set the background to transparent to only show the image.
int height = 300;
int width = 500
Bitmap bmp;
bmp = BitmapFactory.decodeResource(getResources(), R.drawable.myresourcename);
bmp = Bitmap.createScaledBitmap(bmp, width, height, true);
ImageButton imageButton = new ImageButton(this.getActivity());
imageButton.setImageBitmap(bmp);
imageButton.setBackgroundColor(Color.TRANSPARENT);
Then add it to a layout.