Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Self-Destructing Message Android App Sending Messages Adding a File to the Message: Part 2

PNG to JPG for less memory usage

in the previous tutorial I learned that those file were used to reduce image sizes a bit, but they're still pretty big, I want to be able to convert from .png to a .jpg file for less memory usage and for the app to be able to send the picture faster. Can someone guide me on how to do it or the best way to send a lighter image size to improve overall app speed?? Thanks :D

jason chan
jason chan
31,009 Points

you use adobe photoshop save for the web. You also need to change the resolution to smaller one to make it smaller.

A.J. Kandy
A.J. Kandy
Courses Plus Student 12,422 Points

JPEG and PNG image compression algorithms work differently, because they're designed for different kinds of images.

Use PNG for simple, flat-color images (with or without transparency) like icons or diagrams. As Jason mentioned, using Save for Web and tweaking the settings will help a lot.

JPEG was designed for photos, to preserve detail and colours.

If you try to save a detailed photo as a PNG, you'll often find you can't get it below 200k or so - whereas an optimized JPEG can take it down to double digits. Likewise, a simple SVG icon can be reduced to 3K when saved as a PNG with a reduced color palette.

I wrote something on Quora that details all that, if you'd like to know more about Photoshop, file types and color modes: http://qr.ae/f7gwx