{"id":117,"date":"2009-01-20T22:08:42","date_gmt":"2009-01-21T03:08:42","guid":{"rendered":"http:\/\/elegans.uky.edu\/blog\/?p=117"},"modified":"2009-01-20T22:08:42","modified_gmt":"2009-01-21T03:08:42","slug":"scanning-and-posting-photos","status":"publish","type":"post","link":"https:\/\/jimlund.org\/blog\/?p=117","title":{"rendered":"Scanning and posting photos"},"content":{"rendered":"<p>I scanned in a bunch of family photos, fixed them up, added captions, and posted them on Google&#8217;s Picasa Web Album.<\/p>\n<p>I used a flatbed scanner and filled it with photos each scan.  This necessitated splitting and cropping each scan into separate images.  To speed this along I wrote an AppleScript to call Photoshop&#8217;s &#8220;Crop and Straighten Photos&#8221; function and then save the images.<\/p>\n<p><a href=\"http:\/\/elegans.uky.edu\/blog\/pics\/split_img.scpt\">split_img Applescript<\/a><\/p>\n<p>The script worked pretty well for about half the images.  I went through and cropped\/straightened each image.   Then I automatically ran Auto Levels and Auto Contrast or Auto Colors on each image using a second Applescript.<\/p>\n<p><a href=\"http:\/\/elegans.uky.edu\/blog\/pics\/adjust_img.scpt\">adjust_img Applescript<\/a><\/p>\n<p>I wanted to add captions and tags to each image using a list of captions I made when I scanned the photos.  Jpg images can store this meta data in the file using the IPTC standard.  Unfortunately, Google&#8217;s Picasa uploading applications terribly buggy and don&#8217;t work well with IPTC tags added by other programs like iPhoto or EXIFutils.  So I couldn&#8217;t use Google&#8217;s Picasa software or plugins to upload the photos.<\/p>\n<p>Google makes an API for interacting with their web sites available, and there is a Perl module, Net::Google::PicasaWeb, available that allows adding captions and tags when uploading pictures.  Testing showed that it worked so I wrote a small Perl program to take a tab-delimited text file of images, the target album, the caption, and any tags and load the photos onto the Picasa Web Album site.  I needed to use the most up to date version of <a href=\"http:\/\/code.google.com\/p\/net-google-picasaweb\/\">Net::Google::PicasaWeb<\/a> and make a one line change.<\/p>\n<p><a href=\"http:\/\/elegans.uky.edu\/blog\/pics\/picasa_upload.tgz\">picasa_upload Perl program<\/a><\/p>\n<p>My Picasa Web Album:<\/p>\n<table style=\"width:194px;\">\n<tr>\n<td align=\"center\" style=\"height:194px;background:url(http:\/\/picasaweb.google.com\/f\/img\/transparent_album_background.gif) no-repeat left\"><a href=\"http:\/\/picasaweb.google.com\/jlund256\/OldFamilyPhotosJan2009?feat=embedwebsite\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/lh5.ggpht.com\/_v94Revab4Qo\/SXFmhQsziiE\/AAAAAAAABJo\/68XKIUrGZ5o\/s160-c\/OldFamilyPhotosJan2009.jpg\" width=\"160\" height=\"160\" style=\"margin:1px 0 0 4px;\"\/><\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;font-family:arial,sans-serif;font-size:11px\"><a href=\"http:\/\/picasaweb.google.com\/jlund256\/OldFamilyPhotosJan2009?feat=embedwebsite\" style=\"color:#4D4D4D;font-weight:bold;text-decoration:none;\">Old family photos (Jan. 2009)<\/a><\/td>\n<\/tr>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>I scanned in a bunch of family photos, fixed them up, added captions, and posted them on Google&#8217;s Picasa Web Album. I used a flatbed scanner and filled it with photos each scan. This necessitated splitting and cropping each scan into separate images. To speed this along I wrote an AppleScript to call Photoshop&#8217;s &#8220;Crop [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,20],"tags":[],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-linux","category-software"],"_links":{"self":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=117"}],"version-history":[{"count":0,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/117\/revisions"}],"wp:attachment":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}