big size image manipulation in android?

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

big size image manipulation in android?

Postby mr_muskuraha » Fri Nov 12, 2010 11:54 am

dear friends,

any one guide me if i am uploading an image from android phone pro grammatically
my application works fine for small images but in case of if my camera is of 3 or 5 mega pixel it takes

big size images for example 2mb which takes too much time to upload and sometimes gives me out of memory exception.

any one suggest me how can i reduce image size so that quality of image is not disturb
or any other suggestion to solve this issue?

any help would be appreciated.
mr_muskuraha
Senior Developer
Senior Developer
 
Posts: 142
Joined: Wed Jan 13, 2010 8:49 am

Top

Re: big size image manipulation in android?

Postby Schermvlieger » Fri Nov 12, 2010 11:58 am

Hi muskuraha,

You can use BitmapFactory to load your images in memory. Set the Options.insampleSize value to something appropriate for the size of the source picture and the memory you want to use.
Schermvlieger
Senior Developer
Senior Developer
 
Posts: 159
Joined: Fri Feb 26, 2010 1:37 pm

Re: big size image manipulation in android?

Postby mr_muskuraha » Fri Nov 12, 2010 12:53 pm

for reading its ok..

for uploading should i keep waiting to upload image 2mb??
or cropping or other technique is available.?
mr_muskuraha
Senior Developer
Senior Developer
 
Posts: 142
Joined: Wed Jan 13, 2010 8:49 am

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests