0

I am using viewpager to view every single photo inside imageview using this :-

ZoomableImageView imageView = new ZoomableImageView(context);
 Bitmap bimage=  getBitmapFromURL(test);
 imageView.setBitmap(bimage);

public static Bitmap getBitmapFromURL(String src) {
          try {

              URL url = new URL(src);
              HttpURLConnection connection = (HttpURLConnection) url.openConnection();
              connection.setDoInput(true);
              connection.connect();
              InputStream input = connection.getInputStream();
              Bitmap myBitmap = BitmapFactory.decodeStream(input);

              return myBitmap;
          } catch (IOException e) {
              e.printStackTrace();

              return null;
          }
      }

the problem I am facing right now is that when i take photo in landscape mode and view the photo in landscape, the photo in imageview is not shown in full width of the devices. But when i capture it in portrait mode, it comes in full size and in landscape, it is not full size but centralized correctly. i wants to show full width for landscape photo just like the android native gallery.

Any idea?

Thanks in advance.

SweetWisher ツ
  • 7,296
  • 2
  • 30
  • 74
micky
  • 235
  • 2
  • 4
  • 16
  • for image capture are you calling the default camera via intent or your own code ie using Surface view....... – Siva K Nov 07 '13 at 05:38
  • @SivaK for image capture i m calling via intent and save in onactivityresult – micky Nov 07 '13 at 06:32
  • i think that is the problem. in android each manufacturers have their own type of camera capturing style. You need to rotate the captured image and save it in another path and then u have to use it..... – Siva K Nov 07 '13 at 07:03
  • check this - http://stackoverflow.com/questions/8346955/android-camera-resulted-image-should-be-rotated-after-the-capture – Siva K Nov 07 '13 at 07:04

0 Answers0