Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Bitmap Saves As Weird Lines
    primarykey
    data
    text
    <p>When I save a picture taken on certain devices, it saves as some weird lines. I have no idea how to describe the look of this image so here it is: <br/> <br/> <img src="https://i.stack.imgur.com/pXNSq.jpg" alt="enter image description here"> <br/> <br/> My code works perfectly on most devices but we have had two of our users speak up with the following devices. <br/> 1. HTC Thunderbolt <br/> 2. HTC Inspire <br/> Does anybody know how this is happening? Here is my code: <br/></p> <pre><code>PictureCallback jpegCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { mPreview.mCamera.startPreview(); Log.e(TAG, "onPictureTaken - jpegCallback"); try { // start camera saving system CameraPhoneStorageSystem camStorageSys = new CameraPhoneStorageSystem( mContext); FileOutputStream out = null; String str = CameraPhoneStorageSystem .returnImageNewNameForExternalMemory(); galleryAddPic(str); out = new FileOutputStream(str); // mutableBitmap.compress(CompressFormat.JPEG, 85, out); out.write(data, 0, data.length); out.flush(); out.close(); out = null; Toast.makeText(mContext, "saved..", Toast.LENGTH_SHORT).show(); } catch (IOException e) { Toast.makeText( mContext, "Error: Problem Saving Image.. Please check device memory", Toast.LENGTH_SHORT).show(); Log.e("saving", "problem saving images", e); } catch (Exception e) { // fail Log.d(TAG, "ERROR: " + e.getMessage()); } finally { anyPicturesTaken = true; progressBar.setVisibility(View.GONE); snapButton.setVisibility(ImageButton.VISIBLE); Runtime.getRuntime().gc(); } } }; </code></pre> <p>Thank you for any help...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload