Widespread Augmented Reality

Widespread Augmented Reality
Click on the image to get the Android Augmented Reality Heads up Display

Sunday, March 30, 2014

SpiderOnFire and the Companion Android app

I maintain a database of geotagged images at SpiderOnFire. The companion Kit Kat targeted app at Google Play retrieves the images but does not resize them. Rather I have the PHP download script do the work. Here is my code:

array('header'=>'Connection: close\r\n'))); $orig = file_get_contents("$dirfile",false, $context ); $imgstr = imagecreatefromstring($orig); $width = imagesx($imgstr); $height = imagesy($imgstr); $newwidth = '75'; $newheight = '50'; $thumb = imagecreatetruecolor($newwidth, $newheight); imagecopyresized($thumb, $imgstr, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); header("Content-Type: image/jpg"); imagejpeg($thumb); //image as jpg imagedestroy($thumb); imagedestroy($imgstr); ?>