photo

Saving a Video to the Photo Library - iPhone SDK

a 夏天 提交于 2019-11-28 01:47:09
问题 Is there any way for me to save a video in the Documents directory to the Photos Library? I have the link of the video in the documents directory, I just don't know how to save it to the Photos app. Thanks, Kevin 回答1: Use the UISaveVideoAtPathToSavedPhotosAlbum function. 回答2: If you are saving it in a local directory first, then you can save it as.. ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init]; [assetLibrary writeVideoAtPathToSavedPhotosAlbum:url completionBlock:^(NSURL

Upload photo to arbitrary FTP with iPhone app

五迷三道 提交于 2019-11-28 01:21:59
I'd like to upload a photo from my iphone to an arbitrary ftp. How can I do this with Cocoa / Xcode ? Thanks! You'll want to look into CFFTPStream in regard to the iPhone 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

Get image Uri + thumbnail of the picture shot with camera in Android

血红的双手。 提交于 2019-11-28 00:34:50
问题 I want to update an ImageView with a picture I make with the build-in Android camera. I use the following code: void getPhoto() { Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent, TAKE_PICTURE); } After that I acquire the photo with: @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == TAKE_PICTURE) { Bitmap photo = (Bitmap) data.getExtras().get("data"); ImageView photoView = (ImageView)

Storing a reference to an image saved in the Camera Roll

谁都会走 提交于 2019-11-27 23:11:51
问题 I've been working on a simple application which allows the user to take a photo and store it in the camera roll for later use. To do this, I am using a UIImagePickerController, and the method UIImageWriteToSavedPhotosAlbum, which is working perfectly. My question is: Is there any way to store the path to the image in the Camera Roll so that I can use that to call the image again later? Or, do I have to save the image in the app in order to use it again later? It would be great if there was a

Take a picture in iOS without UIImagePicker and without preview it

穿精又带淫゛_ 提交于 2019-11-27 21:42:12
Do you know any way / method to take a photo in iOS and saving it to camera Roll only with a simple button pressure without showing any preview? I already know how to show the camera view but it show the preview of the image and the user need to click the take photo button to take the photo. In few Words: the user click the button, the picture is taken, without previews nor double checks to take / save the photo. I already found the takePicture method of UIIMagePickerController Class http://developer.apple.com/library/ios/documentation/uikit/reference/UIImagePickerController_Class

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

ⅰ亾dé卋堺 提交于 2019-11-27 20:11:21
What is the most straightforward method to resize an image file uploaded via a Django form as an ImageField ? I was annoyed that I couldn't find a complete working example, only bits here and there. I managed to put the solution together myself. Here is the complete example, I put it in clean() method of the form (you can also override models save() method, in the completely same way - changing ImageField's file property). import StringIO from PIL import Image image_field = self.cleaned_data.get('image_field') image_file = StringIO.StringIO(image_field.read()) image = Image.open(image_file) w,

PHP - Upload a web hosted photo to facebook album via Graph API

五迷三道 提交于 2019-11-27 19:23:02
问题 I'm trying to upload www hosted (e.g. http://www.google.se/intl/en_com/images/srpr/logo1w.png) files to a facebook album. Creating an album works just fine, but I don't seem to uploading any photos. I'm using the facebook php-sdk ( http://github.com/facebook/php-sdk/ ) and the examples I already tried are: Upload Photo To Album with Facebook's Graph API How can I upload photos to album using Facebook Graph API I'm guessing CURL uploads perhaps only can manage locally stored files and not web

Exif data TAG_ORIENTATION always 0

送分小仙女□ 提交于 2019-11-27 19:22:54
I need to know the orientation of an image from the gallery (taken by the camera). My initial approach was to use MediaStore.Images.Media.ORIENTATION which was working for my Droid 1. While testing on the HTC Thunderbolt that phone only saves 0 to that field. I then moved to reading the exif data: ExifInterface exifReader = new ExifInterface(mFilePath); exifReader.getAttributeInt(ExifInterface.TAG_ORIENTATION, -1); This also returns 0 for every image. Anyone have ideas on how to properly get the orientation of a photo take on android? dbaugh Here is the code I used onActivityResult() in my

How can I automatically determine whether an image file depicts a photo or a 'graphic'?

时光怂恿深爱的人放手 提交于 2019-11-27 19:04:39
问题 How can I automatically determine whether an image file depicts a photo or a 'graphic'? For example using Imagemagick? 回答1: I am somewhat at the limits of my knowledge here, but I read a paper and have worked out a way to calculate image entropy with ImageMagick - some clever person might like to check it! #!/bin/bash image=$1 # Get number of pixels in image px=$(convert -format "%w*%h\n" "$image" info:|bc) # Calculate entropy # See this paper www1.idc.ac.il/toky/imageProc-10/Lectures/04

Access Photo Album from iPhone Code

巧了我就是萌 提交于 2019-11-27 18:23:39
问题 iPhone Apps like "Picture Map" access all the photos in my iPhone's camera album and display them without ever showing an Image Picker Control. Does anyone know how this is done? Thanks G 回答1: This is an old thread but I will answer as I'm the one who wrote and published Picture Map ! Thomas is right, I was accessing the DCIM folder to parse each file (to get its location from the EXIF structure and to access thumbnails too). As an application has no right to access files outside of its