Monday, 15 June 2015

android - Photos taken in portrait are being saved in landscape -



android - Photos taken in portrait are being saved in landscape -

i've been trying utilize android action_image_capture intent , action_get_content intent either take photo or pick one. problem i'm having when when seek take photo using android photo intent in portrait mode, saves in landscape orientation.

i'm trying save bitmap of correctly orientated photo uri string.

i found question: android photographic camera intent saving image landscape when taken portrait, exact same problem i'm having, reply incomplete , didn't work me. example, resizedbitmap, opts, , file uri.getpath()?

well cameras lock landscape mode default mode of camera(samsung note 2) if take image in potrait mode image still saved in landscape mode. of photographic camera add together metadata image photographic camera vendor, model,etc. amongst various metadata can nowadays 1 intrested in rotation data. specifies degrees image rotated. knowing rotation can utilize exifinterface class.

resizedbitmap images stored bitmap objects in android. image can big loading them whole memory can lead outofmemory error's , create app consume more memory. bitmap first resized appropriate size , loaded memory.

opts opts must referring bitmapfactory.options method. class provides methods alter behaviour of bitmaps making mutable(is set true can apply effects grayscale bitmap) , find height , width in pixels without loading ram,etc.

file class used perform crud operations in file stored in system.

uri.getpath() method returns path image stored or null.

android android-intent camera android-camera android-camera-intent

No comments:

Post a Comment