reading android jpeg EXIF metadata from picture callback

前端 未结 8 1824
天命终不由人
天命终不由人 2020-11-30 20:48

Background: I am writing a camera app for a messenger program. I cannot save the captured image to persistent disk at any time. The camera must support all orientations.

8条回答
  •  温柔的废话
    2020-11-30 21:23

    If you are using Glide library you can get the Exif orientation from an InputStream:

    InputStream is=getActivity().getContentResolver().openInputStream(originalUri);
    int orientation=new ImageHeaderParser(is).getOrientation();
    

提交回复
热议问题