Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build a Self-Destructing Message Android App Retrieving and Viewing Messages Using Picasso to View Images from the Web

Steve Bedard
Steve Bedard
14,335 Points

Error loading picasso image

I have an error in the logcat saying "Bitmap too large to be uploaded into a texture". What can i do ?

5 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

What size image are you trying to load? It's from the web, I assume? Here's one potential list of answers from StackOverflow: http://stackoverflow.com/a/14877627/475217

I debug-checked and it seems that imageUri variable of URI right before Picaso displaying gets correct URI from Intent.

Ben Jakuben
Ben Jakuben
Treehouse Teacher

I think you need to resize the image even further for certain devices. Each device has a size limit for images that can be viewed in an ImageView. In FileHelper.java, try a smaller size for this variable:

public static final int SHORT_SIDE_TARGET = 1280;

Maybe start testing at 1024?

Thank you, Ben. I replied in my post that you just had the comment. By the way, I've been a huge fan of you enjoying your videos.

Steve Bedard
Steve Bedard
14,335 Points

I just use my camera to Take Picture from the Dialog. My camera take 8mpixels photos so i guess that's the problem but i guess Picasso can't manage that.

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Are you downsizing the image at all? Are you using the helper files like in this video? http://teamtreehouse.com/library/build-a-selfdestructing-message-android-app/sending-messages/adding-a-file-to-the-message-part-2 That should reduce images to manageable sizes.

Also, you can check the size of the file directly from Parse. One way is to go to the Data Browser, click on a file in a message and view it in the browser. You can visually see how big it is and also download it to your computer to get the size in MB.

I have this problem, too. I resized the image with resizer and helper in the manner of the video. And in fact, I downloaded the image from Parse and the size was around 1MB.

Timothy Boland
Timothy Boland
18,237 Points

I changed SHORT_SIDE_TARGET down to 1000 and Im still not seeing the images

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Can you get it to work at any smaller sizes?