title: Bitmap is to large to be uploaded into a texture
body: <p>I have a app that uploads a picture made by the camera and upload it to a server.
  But when i try to get it from the server into my imageview it says that the bitmap is to large ( in pixels )</p>
  
  <p>How can i fix this?</p>
  
  <pre><code>new DownloadImageTask(imgProfile)
  .execute("http://api.nl/local/index.php?action=get_user_profile_picture&amp;username="
      + SaveSharedPreferences.user.getUsername()
      + "&amp;password="
      + SaveSharedPreferences.user.getPassword()
      + "&amp;user_number="
      + SaveSharedPreferences.user.getUserNumber());
  </code></pre>
  
  <p>This is my code that i use to process the image to the imageview:</p>
  
  <pre><code>class DownloadImageTask extends AsyncTask&lt;String, Void, Bitmap&gt; {
      ImageView bmImage;
  
      public DownloadImageTask(ImageView bmImage) {
          this.bmImage = bmImage;
      }
  
      protected Bitmap doInBackground(String... urls) {
  
          String urldisplay = urls[0];
          Bitmap mIcon11 = null;
          try {
              try{
                  InputStream in = new java.net.URL(urldisplay).openStream();
                  mIcon11 = BitmapFactory.decodeStream(in);
              } catch(OutOfMemoryError e){
  
              }
          } catch (Exception e) {
              Log.e("Error", e.getMessage());
              e.printStackTrace();
          }
          return mIcon11;
      }
  
      protected void onPostExecute(Bitmap result) {
          bmImage.setImageBitmap(result);
      }
  }
  </code></pre>