photo

Take monochrome picture (black and white) with Android

被刻印的时光 ゝ 提交于 2019-11-27 17:04:08
问题 I would like to take a picture in true black and white in my app. I searched for solutions (in this site too), but I always found solution to put a photo in gray scale (for example in this topic), but it's not what I am looking for ... I also found a topic proposing this : public static Bitmap createContrast(Bitmap src, double value) { // image size int width = src.getWidth(); int height = src.getHeight(); // create output bitmap Bitmap bmOut = Bitmap.createBitmap(width, height, src.getConfig

Fast way of getting the dominant color of an image [closed]

南楼画角 提交于 2019-11-27 17:03:38
I have a question about how to get the dominant color of an image (a photo). I thought of this algorithm: loop through all pixels and get their color, either red, green, yellow, orange, blue, magenta, cyan, white, grey or black (with some margin of course) and it's darkness (light, dark or normal) and afterwards check which colors occurred the most. I think this is slow and not very precise. Is there a better way? If it matters, it's a UIImage taken from an iPhone or iPod touch camera which is at most 5 Mpx. The reason it has to be fast is that simply showing a progress indicator doesn't make

Load contact photo in a listview performance

China☆狼群 提交于 2019-11-27 16:47:44
问题 I want to display contact's photo in a ListView. I am facing performance problem(Scrolling is not smooth) when there is a large number of contacts. I am using ArrayAdapter's getView method to assign contact photo to ImageView. When image is not used then scrolling is smooth. But the default contact application scrolling is very smooth. So there is a performance problem in my application. How can I improve the performance? Please suggest. private class MyArrayListAdapter extends ArrayAdapter

How can I update the Android Gallery after a photo?

跟風遠走 提交于 2019-11-27 14:52:35
For the university i've to develop an application on android with the face detections. For this i've to save various photo on my gallery. The problem is that after saving the photo, the gallery do not update. More precisely, if I delete the directory where I'm going to save the image, I open the application and shoot the photo, then going into the gallery and after an "update" I see the photo. But once I have the directory, if I take a new picture, this did not overwrite the old one. Online i've found this: sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,Uri.parse("file://" + Environment

Modified EXIF data doesn't save properly

我只是一个虾纸丫 提交于 2019-11-27 13:19:05
问题 After countless attempts and sieving through every SO answer + google result, it baffles me that working with EXIF on iOS is so frustrating. Below is working code with its results. [[self stillImageOutput] captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler:^(CMSampleBufferRef imageSampleBuffer, NSError *error) { NSData *imageNSData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer]; CGImageSourceRef imgSource =

iPhone SDK - How to disable the picture preview in UIImagePickerController?

懵懂的女人 提交于 2019-11-27 11:58:14
Is there any way to disable the image preview after taking a picture with the UIImagePickerController? I want to dismiss the ImagePicker as soon as the user pressed the shutter release button. erastusnjuki I asked a similar question here My solution was to create a customized view on top of the default UIImagePickerControllerView. I downloaded the example Augmented Reality Then you can use the OverlayView.m and OverlayView.h by adding them to your project: I made the custom picker toolbar, picker and overlayView global so that I can access them anywhere in the project. In your ViewController.h

Image resize quality (Java) [closed]

浪尽此生 提交于 2019-11-27 10:58:30
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . I have an open-source app which uploads photos to Facebook. To save bandwidth, the photos are automatically resized before uploading (Facebook imposes a maximum size limit). A few people have complained about the photo quality, and in fact you can see the difference (see this

How to take a photo and send to HTTP POST request with Android?

醉酒当歌 提交于 2019-11-27 09:07:09
I know this has answers here and there, but I couldn't make any of them work. Does anybody know a good reference, or a tutorial for this, maybe also post here? What I need to do is : 1) provide a button, that opens the camera application. I have done this by a startResultActivity() 2) user takes the photo, and returns to the application, with the photo saved, preferably with a preview in an ImageView. I tried something, but I cannot test in an emulated device. 3) presses a "send" button, and the application sends the picture to HTTP POST. With "multipart", whatever that is. The php developer

getting latest photos from friends not working

人盡茶涼 提交于 2019-11-27 07:32:28
问题 I tried getting the latest photos fo my friends using a method described here: FQL - Can i get photos of my friends posted this week At first it seemed to be working fine but then I noticed that some of the photos of my friends weren't being fetched even though they had a higher timestamp (the photos were being sorted by created field from photo FQL table)... After a bit of debugging I noticed that the problem is in SELECT aid FROM album WHERE owner IN (SELECT uid2 FROM friend WHERE uid1=me()

Swift Photo Library Access

岁酱吖の 提交于 2019-11-27 07:13:13
问题 I would like to access photos from the user's photo library in my app and I was looking at the UIImagePickerController to do so. However, I was wondering if it is possible to access and view the photos from the photo library without actually storing those photos in the app? So basically the app would store references to the selected photos, rather than storing the photos themselves. This is to prevent the app from taking up large amounts of space from storing each photo. Thanks! 回答1: It is