[android-developers] Re: Bitmap issue and Webview rendering issue in ICS
Hi
I had worked with the same issue for longer period but i haven't find the solution to work on images of longer width and height(BITMAP),
finally i have used it by resizing the image,
if we see the size required to create the image it need width*height*4 bytes which is not supported for all the devices
the supported size for all the images is 512*512
the solution i have suggest for larger images is as follows
yourSelectedImage = BitmapFactory.decodeFile(path);
Float Ratio=(float) ((yourSelectedImage.getWidth()*1.0)/yourSelectedImage.getHeight());
Float byratio=480/Ratio;
if(yourSelectedImage.getHeight()>490||yourSelectedImage.getWidth()>490)
{
yourSelectedImage=Bitmap.createScaledBitmap(BitmapFactory.decodeFile(path),(int)(byratio*1.0), 640, true );
}
the resultant will be re sized with the same ratio,
this is the main reason why all the apps of photo editor have a negitive rating saying "low image quality"
Thanks
Shiva,
On Tuesday, November 6, 2012 1:45:05 AM UTC+5:30, sourabh deshpande wrote:
Hi,--1) I am developing an application which has very high quality image contents. To load these images asynchronously I am usingThis library has many options of using memory cache and disc cache. I am using memory cache in onCreateView() of fragment and clearing the memory cache in destroyView() of fragments. But still I am facing the OutOfMemoryException. I have even tried calling Bitmap.recycle() but no luck.What is the best way to clear the bitmap memory?2) The application has one local html5 component which is hosed in webview. The html component rendering is extremely slow in 4.0 and above. I have tested it with Galaxy Nexus. Its extremely slow. We can see each frame of animation. I have alredy tried enabling and disabling the hardware acceleration. But both does not work.How can I handle this?Sourabh Deshpande.
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home