How do I save data from Camera to disk using MediaStore on Android?

后端 未结 5 1239
予麋鹿
予麋鹿 2020-11-30 03:43

For my application, I\'d been using my own Camera class for taking images and my own database but soon enough I couldn\'t really keep up with changes and I decided to use th

5条回答
  •  日久生厌
    2020-11-30 04:12

    FYI , found this on docs : The caller may pass an extra EXTRA_OUTPUT to control where this image will be written. If the EXTRA_OUTPUT is not present, then a small sized image is returned as a Bitmap object in the extra field. This is useful for applications that only need a small image. If the EXTRA_OUTPUT is present, then the full-sized image will be written to the Uri value of EXTRA_OUTPUT.

    located here :http://developer.android.com/reference/android/provider/MediaStore.html

    so the app can save full size image for you , if you tell it where.

    **Edit : This is not the case with HTC devices. HTC (not nexus) that uses htc sense ui have branched from android 1.5 and carry a bug that always save the image in low res. you can lunch activity for camera and use the share function from camera to use the full sized image.

提交回复
热议问题