iOS taking photo programmatically

This is very simple, just use the AVFoundation reference guide: https://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/04_MediaCapture.html If you don’t want the user to see the preview input you can just skip the set preview layer part of the code. Edit: To be more detailed. 1)You set your capture configuration using the AVFoundation. Set the camera input to frontal, turn off … Read more

open cv error: (-215) scn == 3 || scn == 4 in function cvtColor

Give the full path of image with forward slash. It solved the error for me. E.g. import numpy as np import cv2 img = cv2.imread(‘C:/Python34/images/2015-05-27-191152.jpg’) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) Also, if you give 0 in second parameter while loading image using cv2.imread than no need to convert image using cvtColor, it is already loaded as … Read more

Upload photo to Facebook with Facebook Android SDK in Android

Just posted here the simple way to upload a photo: android facebook publish photo Code: byte[] data = null; Bitmap bi = BitmapFactory.decodeFile(photoToPost); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bi.compress(Bitmap.CompressFormat.JPEG, 100, baos); data = baos.toByteArray(); Bundle params = new Bundle(); params.putString(“method”, “photos.upload”); params.putByteArray(“picture”, data); AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(facebook); mAsyncRunner.request(null, params, “POST”, new SampleUploadListener(), null);

Best place to find Android Button

I think the best method is to design it yourself. Design it with Adobe Photoshop and then parse it to html or XML. There is a very good tool in Photoshop to do that. You can use this video as a guide https://www.youtube.com/watch?v=_BM59afMRDU