image-capture

java.lang.OutOfMemoryError - BitmapFactory.decode(strPath)

99封情书 提交于 2019-12-17 07:12:48
问题 I am getting java.lang.OutOfMemoryError , whenever i am calling UploadActivity.java Line Number 176 is: Bitmap bm = BitmapFactory.decodeFile(strPath); View my Log: 12-07 17:57:10.585: E/AndroidRuntime(16708): FATAL EXCEPTION: main 12-07 17:57:10.585: E/AndroidRuntime(16708): java.lang.OutOfMemoryError 12-07 17:57:10.585: E/AndroidRuntime(16708): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 12-07 17:57:10.585: E/AndroidRuntime(16708): at android.graphics.BitmapFactory

Android: How to capture image without showing preview

人盡茶涼 提交于 2019-12-14 03:48:25
问题 I am using the following code to capture the image in Android Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, 100); After capturing an image, its showing a preview and asking whether to save or discard the image. Is there anyway where i can avoid this preview? The Camera app in Android dosent shows the preview. So there should be a way i guess. Thanks in advance. 回答1: The camera app doesn't give other apps the option to

What is size of thumbnail returned by ACTION_IMAGE_CAPTURE intent

梦想与她 提交于 2019-12-13 16:06:58
问题 I'm using the standard camera intent to take a photo: Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(takePictureIntent, actionCode); And then in onActivityResult () Bundle extras = intent.getExtras(); Bitmap imageBitmap = (Bitmap) extras.get("data"); mImageView.setImageBitmap(imageBitmap); Bitmap is a thumbnail. That's great - I don't need full size images. Before user can take a photo, I display a default thumbnail that they can click and that

How to capture high resolution image on Windows Mobile

走远了吗. 提交于 2019-12-13 03:27:03
问题 I would like to capture high resolution image with Windows Mobile device. I've tried the example from WM SDK, but it captures just a single frame of video camera and the resolution is poor. Has anyone any experience with image capturing on Pocket PC with C++? Thanks 回答1: You need to change the filter used by the example code to capture a high-resolution image. When you use the viewfinder in a digital camera, the camera "simulates" a video camera look by applying the lowest resolution filter

Cordova: how to take a picture without using camera app

為{幸葍}努か 提交于 2019-12-12 10:55:46
问题 I'm working on an Android App with Apache Cordova. I'd like to take a picture without opening camera application. I'd like the camera shoot by clicking a button from my app and save the picture on a specific destination with no interaction with the camera phone application. Here the simple js I'm using to call getPicture (It produces an asynchronous call to camera application): function capturePhoto() { navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50, destinationType:

C# Saving a form to image without anti aliasing

丶灬走出姿态 提交于 2019-12-12 03:09:35
问题 I am checking if i am able to capture an image and save it to an image file without losing the pixel resolution? I had a 1D barcode inside a form, however i will need to print this form together with the barcode. When i capture and save to a bmp file and print, the barcode is not clear at all. Even printscreen is anti-aliasing? The situation is a lot like the thread below except now i need to save it later for printing. Undesired anti-aliasing when drawing bitmap on a window Thanks in advance

Detect camera used (front-facing or rear-facing camera)

半城伤御伤魂 提交于 2019-12-12 00:35:25
问题 I want to detect which camera that my user used to capture an image, to then initialize a value according to the type (Front/Rear camera). The following is my trying, After I run the app, value is always 0.417 ! public class Home extends Activity { double value = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.MainActivity); AlertDialog.Builder builder = new AlertDialog.Builder(this); input = new EditText(this);

Ionic Upload Image to Server

假装没事ソ 提交于 2019-12-12 00:17:33
问题 I need to upload captured image and album image to the server in ionic app. Is anyone know how to do that? I am just fresh in developing ionic app 回答1: It is not really clear what you mean by uploading an image to the server with an ionic app. A suggestion might be to convert the image to a Base64 string and send it to the server. 回答2: i am using cordova imagepicker(pick image from camera) and upload to s3 server. function getImageFromGallery(cb) { // console.log('getImageFromGallery'); var

how to control/save images took with android camera programmatically?

强颜欢笑 提交于 2019-12-11 08:18:22
问题 i've been trying to create a camera-related app. i know that i could create it programmatically from top, but i would prefer using the one that the phone supports. what i mean is, rather then creating the camera from 0, i would/could call the camera activity. after all, it provides all the system and gui that i needed. however, the problem is i wanted the result/image took to be saved in a folder that i created before, rather then saving it in the default camera folder. and also renaming the

iOS Screen Capture is blurry

笑着哭i 提交于 2019-12-11 06:36:20
问题 I am having trouble getting a screen shot that is not blurry - first I tried this: Screen capture for iOS and it was not blurry but I think Apple will not let this code through - won't make the review? so I went with the official solution in the developer docs: similar to this: Capturing Screen But when I use the 'official' way, the image it creates is blurry Here is the code I am using straight from the dev support docs (iOS6 and I am scaling it, but there is no difference if scale is 0):