photo

Android camera freezes after taking one photo

十年热恋 提交于 2019-12-18 19:01:44
问题 I'm doing one project with camera and after taking one photo camera freezes and u have to finish the activity and recall it again to take another photo, how can I take photo freeze for just 1-2 sec and then surface view to have the camera again. the same for video I am using media recorder, taking video press stop video saves and screen is still alive but I can not take video again I have to restart the activity? Anybody have a solution? 回答1: Do any image processing in a background AsyncTask

Android - Get Contact Photo from phone number

主宰稳场 提交于 2019-12-18 14:52:49
问题 how can I get contact photo from a contact's address (phone number)? 回答1: public static Bitmap retrieveContactPhoto(Context context, String number) { ContentResolver contentResolver = context.getContentResolver(); String contactId = null; Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number)); String[] projection = new String[]{ContactsContract.PhoneLookup.DISPLAY_NAME, ContactsContract.PhoneLookup._ID}; Cursor cursor = contentResolver.query( uri,

How to embed image in html in MFMailComposeViewController for iPhone

懵懂的女人 提交于 2019-12-18 11:48:15
问题 I am trying to embed a bunch of small images in an html table which I want to send using MFMailComposeViewController. After doing some search I figured out almost everyone is suggesting "NSData+Base64 by Matt Gallagher" class to encode the photo in Base64encoding and embedding it into html. While it looks to work on iPhone and with some email servers but Gmail and Yahoo do not show the images embedded this way. This problem is mentioned here as well. I was wondering if anyone has a better

Phonegap - Retrieve photo from Camera Roll via path

限于喜欢 提交于 2019-12-18 11:47:47
问题 In my PhoneGap/jQuery Mobile app, I'm currently using PhoneGaps' Camera API to allow the user to take a photo, which is also stored in the Camera Roll. I'm setting DestinationType to FILE_URI and saving this path in a local db. However, FILE_URI is a path to a temporary location that is destroyed when the app is closed. I was thinking of saving the name of the image and then retrieving the image from the Camera Roll. Is there a path I can use to later retrieve the images in the Camera Roll? I

How do I save an ImageView as an image?

冷暖自知 提交于 2019-12-18 05:46:25
问题 I have an ImageView with a share intent( which works great, brings up all the apps I can share the image with), however, I can not share the photo because it has no path on my phone. How do I go about saving the ImageView on my phone? Below is my code. public void taptoshare(View v) { View content = findViewById(R.id.myimage); content.setDrawingCacheEnabled(true); Bitmap bitmap = content.getDrawingCache(); File file = new File("/DCIM/Camera/image.jpg"); try { file.createNewFile();

PHP Perform Action with Incoming Email

十年热恋 提交于 2019-12-18 05:23:14
问题 I'm building a photo sharing website (just testing PHP stuff) and I want users to be able to submit photographs using email. For instance, the website needs to run a script when the users sends an email with an image attachment and text in the body. The image would be uploaded to the server, and a new "photo post" would be created with the text in the email body being the description. My question is, how do I tell my server to run a script automatically when email is RECEIVED? Any/all help is

Iterate through photo library on OS X?

*爱你&永不变心* 提交于 2019-12-18 05:07:33
问题 I'm trying to iterate through a user's photo library on OS X. On iOS, I would use the Photos framework, but apparently that's not available on OS X, and we're supposed to use the Media Library framework instead. However, while I was able to use the code linked above to get access to a MLMediaSource object, I'm having a hard time figuring out how to iterate through the photo assets. The Media Library Framework documentation makes reference to a mediaObjectForIdentifier: method, which sounds

Upload photo to arbitrary FTP with iPhone app

你。 提交于 2019-12-17 16:50:23
问题 I'd like to upload a photo from my iphone to an arbitrary ftp. How can I do this with Cocoa / Xcode ? Thanks! 回答1: You'll want to look into CFFTPStream in regard to the iPhone 回答2: There's a nice framework out there called ConnectionKit. I haven't used it personally, but I've heard it's good. 来源: https://stackoverflow.com/questions/128378/upload-photo-to-arbitrary-ftp-with-iphone-app

Upload photo to arbitrary FTP with iPhone app

别来无恙 提交于 2019-12-17 16:50:03
问题 I'd like to upload a photo from my iphone to an arbitrary ftp. How can I do this with Cocoa / Xcode ? Thanks! 回答1: You'll want to look into CFFTPStream in regard to the iPhone 回答2: There's a nice framework out there called ConnectionKit. I haven't used it personally, but I've heard it's good. 来源: https://stackoverflow.com/questions/128378/upload-photo-to-arbitrary-ftp-with-iphone-app

How can I resize an image file uploaded with Django using an ImageField Model? [closed]

对着背影说爱祢 提交于 2019-12-17 15:49:15
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . What is the most straightforward method to resize an image file uploaded via a Django form as an ImageField ? 回答1: I was annoyed that I couldn't find a complete working example, only bits here and there. I