0

I have a Scrollview that contains 4 big size images 750x1023, 750x2265, 750x1898, and 750x1112

I load image with Picasso

Picasso.with(getContext()).load(resIds[i]).fit().centerCrop().into(mainImageview.get(i));

But it brings to OutOfMemory error. It makes to problem:

  1. not all images load
  2. app closing

Its important not to make image smaller - it can make UI uncorrect.

What the way to solve this problem? id need, to post code of program - just say what piece.

Thanks!

After all manipulation, problem is still unsolved.. If i scale images with BitmapFactory, it gives "Bitmap too large to bu uploaded into a texture", what ever size i write. If a scale with picasso, it crops my image What ever i do, app memmory enought for two, three switching pages... I'm exhausted because of this problem ...Help

1 Answers1

0

The issue I believe is with gl max size which is something like 2048x2048 and the error will be cannot apply texture or something to that effect Picasso has a lot of ways to scale images but if you must use the full size image then its possible to cut the image into 4 or more pieces and assemble it like Google maps check this "Bitmap too large to be uploaded into a texture"

Community
  • 1
  • 1
Martin Seal
  • 616
  • 2
  • 14
  • 32
  • Thanks, I ll try this way! – Lera Fatova Jun 08 '16 at 07:41
  • After all manipulation, problem is still unsolved.. If i scale images with BitmapFactory, it gives "Bitmap too large to bu uploaded into a texture", what ever size i write. If a scale with picasso, it crops my image What ever i do, app memmory enought for two, three switching pages... I'm exhausted because of this problem ...Help – Lera Fatova Jun 09 '16 at 20:30