{"id":200,"date":"2007-10-27T21:16:33","date_gmt":"2007-10-27T21:16:33","guid":{"rendered":"http:\/\/dalelane.co.uk\/blog\/?p=200"},"modified":"2007-10-27T22:01:42","modified_gmt":"2007-10-27T22:01:42","slug":"hackday-hack-attempt-3-a-social-camera","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=200","title":{"rendered":"HackDay &#8211; hack attempt 3 &#8211; a &#8216;social camera&#8217;"},"content":{"rendered":"<p>It was the afternoon of HackDay&#8230; and I&#8217;d tried a couple of <a href=\"http:\/\/dalelane.co.uk\/blog\/?p=198\">hack<\/a> <a href=\"http:\/\/dalelane.co.uk\/blog\/?p=199\">ideas<\/a> without a massive amount of success. I wanted to have something functional to show by the end of the day, so thought I&#8217;d give something easy a try.<\/p>\n<p>I&#8217;d spent quite a bit of the morning getting to know the Windows Mobile camera API, so I thought I&#8217;d try and use it in an application. <\/p>\n<p><img decoding=\"async\" src=\"post-images\/071027-socialcamera.jpg\" align=\"right\" hspace=\"10\" vspace=\"5\"\/><b>Background<\/b><br \/>\nMy Windows Mobile cameraphone comes with a basic camera app. Then you can do what you want with your photos. <\/p>\n<p><b>The idea<\/b><br \/>\nI thought I&#8217;d try writing an alternative camera app that makes it easier to do some things with photos &#8211; such as uploading to <a href=\"http:\/\/www.flickr.com\/\">flickr<\/a>, posting to a <a href=\"http:\/\/wordpress.com\/\">WordPress<\/a> blog, sending by email, and so on.<\/p>\n<p><b>Why?<\/b><br \/>\nWithout sounding like a Kodak advert, photos are more fun if you can share them. Anything that makes that easier could be a good thing. <\/p>\n<p><!--more--><b>What was the plan?<\/b><br \/>\nIt was fairly late in the afternoon by now, so I went back to <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/bb158547.aspx\">managed code<\/a>. The app is based around using the <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/microsoft.windowsmobile.forms.cameracapturedialog.cameracapturedialog.aspx\">CameraCaptureDialog<\/a> to get an image, then offer a bunch of things to do with it. <\/p>\n<p><img decoding=\"async\" src=\"post-images\/071027-flickr.jpg\" align=\"left\" hspace=\"10\" vspace=\"5\"\/><b>flickr<\/b> &#8211; A chance to play with a web service &#8211; I went looking for the <a href=\"http:\/\/www.flickr.com\/services\/api\/\">flickr API<\/a> for uploading pictures. <\/p>\n<p>This lets the user fill in the title, description and some tags and add it to their flickr space without needing to leave the camera app. <\/p>\n<p>And I reused <a href=\"http:\/\/dalelane.co.uk\/page.php?id=42\">some old GPS code<\/a> to add the ability to <a href=\"http:\/\/www.flickr.com\/services\/api\/flickr.photos.geo.setLocation.html\">give flickr the location that the photo was taken<\/a>. This is quite neat &#8211; although you can use <a href=\"http:\/\/www.flickr.com\/account\/uploadbyemail\/\" target=\"_blank\">email to upload to flickr<\/a> from a phone, it would be much harder to include the location.<br \/>\n<br clear=\"all\"\/><br \/>\n<img decoding=\"async\" src=\"post-images\/071027-wordpress.jpg\" align=\"right\" hspace=\"10\" vspace=\"5\"\/><b>WordPress<\/b> &#8211; Ah&#8230; erm&#8230; yeah&#8230; I kinda ran out of time and never got round to this. \ud83d\ude42<br \/>\n<br clear=\"all\"\/><br \/>\n<img decoding=\"async\" src=\"post-images\/071027-email.jpg\" align=\"left\" hspace=\"10\" vspace=\"5\"\/><b>email<\/b> &#8211; A simple form that will let you send the photo as an attachment in an email.<br \/>\n<br clear=\"all\"\/><br \/>\n<b>add to Contacts<\/b> &#8211; Windows Mobile can attach pictures to contacts in the Outlook address book &#8211; so that someone&#8217;s picture is shown when they phone you, or next to emails and text messages that they send you. This form gives you a list of contacts in your address book, and lets you choose one for the photo to be added to.<\/p>\n<p><b>add GPS location to EXIF data<\/b> &#8211; flickr has a weird way of handling GPS location data &#8211; it doesn&#8217;t seem to use EXIF tags as you might expect, it has it&#8217;s own way. But I thought it might be nice to add the ability to add the GPS location where the photo was taken to the photo&#8217;s EXIF data. <\/p>\n<p>I managed to get the GPS location okay, but wasn&#8217;t able to add it to the photo. The .NET functions to add EXIF tags to photos, like <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/system.drawing.image.setpropertyitem.aspx\">SetPropertyItem<\/a> are not included in the .NET Compact Framework that you get on Windows Mobile, and I ran out of time before I could work out how to add the data in manually. <\/p>\n<p><br clear=\"all\"\/><br \/>\nAnd there it is. Not entirely finished, but by this point it was about 6pm on a Friday evening, and HackDay was over. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>It was the afternoon of HackDay&#8230; and I&#8217;d tried a couple of hack ideas without a massive amount of success. I wanted to have something functional to show by the end of the day, so thought I&#8217;d give something easy a try. I&#8217;d spent quite a bit of the morning getting to know the Windows [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[],"class_list":["post-200","post","type-post","status-publish","format-standard","hentry","category-ibm","category-tech"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=200"}],"version-history":[{"count":0,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/200\/revisions"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}