Images taken with ACTION_IMAGE_CAPTURE always returns 1 for ExifInterface.TAG_ORIENTATION on some Gingerbread devices

Ok guys, it seems like this bug for android won’t be fixed for a while. Although I found a way to implement the ExifInformation so that both devices (ones with proper Exif tag, and also improper exif tags work together).. So the issue is on some (newer) devices, there’s a bug that makes the picture … Read more

Capturing a single image from my webcam in Java or Python

@thebjorn has given a good answer. But if you want more options, you can try OpenCV, SimpleCV. using SimpleCV (not supported in python3.x): from SimpleCV import Image, Camera cam = Camera() img = cam.getImage() img.save(“filename.jpg”) using OpenCV: from cv2 import * # initialize the camera cam = VideoCapture(0) # 0 -> index of camera s, … Read more

How to capture UIView to UIImage without loss of quality on retina display

Switch from use of UIGraphicsBeginImageContext to UIGraphicsBeginImageContextWithOptions (as documented on this page). Pass 0.0 for scale (the third argument) and you’ll get a context with a scale factor equal to that of the screen. UIGraphicsBeginImageContext uses a fixed scale factor of 1.0, so you’re actually getting exactly the same image on an iPhone 4 as … Read more