android - Picture Clicked from default camera not getting saved with proper orientation -
iam trying capture picture using
intent intent = new intent(mediastore.action_image_capture); if (intent.resolveactivity(getpackagemanager()) != null) { intent.putextra(mediastore.extra_output, uri.fromfile(photofile)); startactivityforresult(takepictureintent, request_code); } }
but when result, orientation of picture not proper in of cases. since need use picture @ number of places, want picture saved proper orientation. how can done?
doubt : 1. doesn't android default camera take care of orientation when saving picture? 2. have use "exifinterface" tweak every time when display picture local?
the orientation of picture not proper in of cases
that depends on opinion of "proper". various device manufacturers , camera apps believe having exif orientation tag proper.
how can done?
you welcome scan image exif header , rotate image yourself, slow , memory-intensive.
- doesn't android default camera take care of orientation when saving picture?
first, not using "android default camera". camera app can respond intent
. there thousands of device models, hundreds of pre-installed camera apps, let alone apps users might play store or elsewhere.
second, noted above, developers feel "take care of orientation" having appropriate exif header.
- do have use "exifinterface" tweak every time when display picture local?
well, depends. convert once , save converted image, use converted 1 going forward, rather converting every time. whether or not appropriate saving converted image or not , users.
Comments
Post a Comment