[android-developers] Re: jpeg library crashing
1. LogCat will always show something 2. Which jpeg library? On Tuesday, November 6, 2012 1:02:52 PM UTC, jobaal wrote: Hi Mi app crashes sometimes when a jpeg library is called. Is there any way to know what is happening inside the lib or at least a way to capture when this is happening? Right now the app closes itself without showing any message, it would be very helpful if at least an error message was shown when this happens. Thanks -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: jpeg library crashing
Why would you need a third party JPEG lib? On Tuesday, November 6, 2012 7:02:52 AM UTC-6, jobaal wrote: Hi Mi app crashes sometimes when a jpeg library is called. Is there any way to know what is happening inside the lib or at least a way to capture when this is happening? Right now the app closes itself without showing any message, it would be very helpful if at least an error message was shown when this happens. Thanks -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: jpeg library crashing
On Tue, Nov 6, 2012 at 10:34 AM, bob b...@coolfone.comze.com wrote: Why would you need a third party JPEG lib? Why would you need a third party of any sort? To do things above and beyond what the framework allows. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: jpeg library crashing
Hi The instance where your application is crashing is definitely due to heap, 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/jpeg or any image), 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 of the original image, using this doesn't need to use any third party jar files, 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 6:32:52 PM UTC+5:30, jobaal wrote: Hi Mi app crashes sometimes when a jpeg library is called. Is there any way to know what is happening inside the lib or at least a way to capture when this is happening? Right now the app closes itself without showing any message, it would be very helpful if at least an error message was shown when this happens. Thanks -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en