android-camera

Cropping a full screen camera image bitmap into a Surface view height and width

做~自己de王妃 提交于 2021-01-28 05:15:08
问题 I am trying to click only a rectangular portion of the screen from camera using this code: Java code: package com.example.cameraapplication; import androidx.appcompat.app.AppCompatActivity; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.hardware.Camera; import android.os.Bundle; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget

Android SDK - Detect physical location of front-facing camera

拥有回忆 提交于 2021-01-27 18:36:06
问题 The "normal" place for a front facing camera is to be on the top of the device when holding it in portrait (display taller than wide). The camera, when it is on top, is usually in near the middle, but not always. Sometimes it is in the corner. There are also other devices (mostly tablets) where the hardware manufacturer has places the camera on the side when holding the device in portrait. For instance, the Lenovo Tab 10 (https://www.amazon.com/gp/product/B01MR3FS4F/ref=oh_aui_search

Bitmap Not Reading EXIF Data on Decode

孤街醉人 提交于 2021-01-27 07:43:01
问题 My Problem I have a series of Bitmaps that I would like to load up in the correct orientation. When I save the image I go in and set the orientation attribute using the ExifInterface ExifInterface exif = new ExifInterface(EXTERNAL_IMAGE_PATH+File.separator+this._currentPhotoName+JPEG_FILE_SUFFIX); int rotation = CCDataUtils.exifToDegrees(exif.getAttributeInt(ExifInterface.TAG_ORIENTATION,ExifInterface.ORIENTATION_NORMAL)); Log.v("PhotoManager", "Rotation:"+rotation); if (rotation > 0) { exif

Bitmap Not Reading EXIF Data on Decode

故事扮演 提交于 2021-01-27 07:41:24
问题 My Problem I have a series of Bitmaps that I would like to load up in the correct orientation. When I save the image I go in and set the orientation attribute using the ExifInterface ExifInterface exif = new ExifInterface(EXTERNAL_IMAGE_PATH+File.separator+this._currentPhotoName+JPEG_FILE_SUFFIX); int rotation = CCDataUtils.exifToDegrees(exif.getAttributeInt(ExifInterface.TAG_ORIENTATION,ExifInterface.ORIENTATION_NORMAL)); Log.v("PhotoManager", "Rotation:"+rotation); if (rotation > 0) { exif

Bitmap Not Reading EXIF Data on Decode

為{幸葍}努か 提交于 2021-01-27 07:39:00
问题 My Problem I have a series of Bitmaps that I would like to load up in the correct orientation. When I save the image I go in and set the orientation attribute using the ExifInterface ExifInterface exif = new ExifInterface(EXTERNAL_IMAGE_PATH+File.separator+this._currentPhotoName+JPEG_FILE_SUFFIX); int rotation = CCDataUtils.exifToDegrees(exif.getAttributeInt(ExifInterface.TAG_ORIENTATION,ExifInterface.ORIENTATION_NORMAL)); Log.v("PhotoManager", "Rotation:"+rotation); if (rotation > 0) { exif