Try setting fullscreen in your manifest instead: android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
On Sun, Nov 14, 2010 at 7:26 PM, Stephen Lebed <[email protected]> wrote: > It is a supported size on the g2. I'm not specifying the size, its > the default res for the camera. > > It looks like part of the problem is with > > getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, > WindowManager.LayoutParams.FLAG_FULLSCREEN); > > I use this in the onCreate method. Again, I use this all the time, > but when I comment out this line, I can save uncorrupted images. I'm > still hunting for an answer. It is related to my layout xml. > > > > On Nov 14, 12:53 pm, blindfold <[email protected]> wrote: >> 2.592 x 1.952 looks like an unusual (unsupported) image size to me. >> Maybe try 2.592 x 1.944? >> >> Regards >> >> On Nov 14, 7:58 pm, Stephen Lebed <[email protected]> wrote: >> >> >> >> >> >> >> >> > I can't figure out why I'm getting corrupted images when I save them >> > in my app. In fact the thumbnail seems to be fine, but the actual >> > image is corrupted, as if the stride value is not being set >> > correctly. The following is the code I'm using the save the image, >> > which is taken from other version of camera apps almost directly. In >> > other apps it seems to be saving images without problem. This is >> > called from a Camera.PictureCallback.onPictureTaken(byte[] data, >> > Camera camera) >> >> > File filename = new File("Test_SnapShotK.jpg"); >> > File exportDir = new File(Environment.getExternalStorageDirectory(), >> > "TestDir"); >> >> > if (!exportDir.exists()) { >> > exportDir.mkdirs(); >> > Log.i(TAG, "making directory " + exportDir.toString()); >> >> > } >> >> > File file = new File(exportDir, filename.getName()); >> >> > try { >> > FileOutputStream fileOutputStream = new FileOutputStream(file); >> > fileOutputStream.write(data); >> > fileOutputStream.flush(); >> > fileOutputStream.close(); >> >> > } catch (IOException e) { >> >> > Log.e(TAG, e.getMessage(), e); >> >> > } >> >> > Since I can't attach the image I'm getting directly in this post, here >> > is a link to it. >> >> >http://www.mechnology.com/Test_SnapShotK.jpg >> >> > Has anyone else gotten this problem and have been able to resolve it. >> > I'm testing this on a G2 phone. Any help is greatly appreciated. >> >> > Stephen > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

