picasso: won't load camera images

I am trying to use Picasso to load images in an app from the SD card. If I load images that were not taken by the camera they load in fine, but if I try to get images that were taken by the camera they don’t load.

Images over http work too, just not the camera ones.

I have also tried downloading the image from that URL and putting it on the phones storage, it loads fine that way too, it only seems to be images taken from the phones camera. Tested it on Galaxy S2 and S5 and a Galaxy Ace 3. So it could be a Samsung/Galaxy issue only.

Calling Code:

    String file = "/storage/extSdCard/DCIM/Camera/20140609_204344.jpg";

    picasso
        .load(new File(file)) // this does not work
        //.load("http://upload.wikimedia.org/wikipedia/commons/4/4e/Pleiades_large.jpg")// this works
        .fit()
        .error(R.drawable.logo)
        .into(this.imageView);

Exception that occurs:

06-09 21:31:47.662: W/System.err(16633):    java.lang.IllegalArgumentException: y + height must be <= bitmap.height()
06-09 21:31:47.672: W/System.err(16633):    at android.graphics.Bitmap.createBitmap(Bitmap.java:783)
06-09 21:31:47.672: W/System.err(16633):    at com.squareup.picasso.BitmapHunter.transformResult(BitmapHunter.java:457)
06-09 21:31:47.672: W/System.err(16633):    at com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:154)
06-09 21:31:47.672: W/System.err(16633):    at com.squareup.picasso.BitmapHunter.run(BitmapHunter.java:101)
06-09 21:31:47.672: W/System.err(16633):    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
06-09 21:31:47.672: W/System.err(16633):    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-09 21:31:47.672: W/System.err(16633):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-09 21:31:47.672: W/System.err(16633):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-09 21:31:47.672: W/System.err(16633):    at java.lang.Thread.run(Thread.java:841)
06-09 21:31:47.672: W/System.err(16633):    at com.squareup.picasso.Utils$PicassoThread.run(Utils.java:394)

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 54 (4 by maintainers)

Commits related to this issue

Most upvoted comments

I am experiencing this too.

Camera images don’t seem to load especially the ones with sizes greater than 1mb.

Is there any hack or fix available?