{"id":1968,"date":"2007-06-18T13:02:14","date_gmt":"2007-06-18T18:02:14","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2007\/06\/18\/sharing-screenshots-with-flickr\/"},"modified":"2010-09-30T14:02:28","modified_gmt":"2010-09-30T14:02:28","slug":"sharing-screenshots-with-flickr","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2007\/06\/18\/sharing-screenshots-with-flickr\/","title":{"rendered":"Sharing screenshots with Flickr"},"content":{"rendered":"<p>Go look to the file exchange and you will see some really incredible things people are doing with MATLAB.  Posting code to the File Exchange is a good way to share, but we are always looking for other ways to help people share their MATLAB-related work.  <a href=\"http:\/\/www.flickr.com\">Flickr<\/a> is a way to store, sort, search and share your photos online.  For a limited time only, I have made a Flickr account where you can post your MATLAB  figure screenshots with one command.   To do this, you will need to get some code from my buddy Rich.   <\/p>\n<blockquote><p><a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=15222&#038;objectType=file (link no longer works)\">ShareIt<\/a>: uses MATLAB&#8217;s print command to print one or more figures or models to file, one file per figure\/model, and then uses MATLAB&#8217;s sendmail command to email the output to one or more users. It supports adding Flickr tags to the email so the image can be tagged when emailed to your Flickr account.<\/p><\/blockquote>\n<p>Once you have <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/sendmail.html\">sendmail<\/a> configured in MATLAB, then you can use the following wrapper code to send things to <a href=\"http:\/\/www.flickr.com\/photos\/matlabdoug\/\">my Flickr account<\/a>:<\/p>\n<hr>\n<p><code><\/p>\n<p>function flickr(description)<br \/>\n%% FLICKR send specified figure to MATLABDoug's account on Flickr.<br \/>\n%<br \/>\n% This account is not guaranteed to stay active.<\/p>\n<p>fig = gcf;<br \/>\n%% setup the options to know what and how to share <\/p>\n<p>% what I'm sending<br \/>\nmyOptions.toSend = fig;<\/p>\n<p>% who to send it to<br \/>\nmyOptions.mailTo =  'non28step@photos.flickr.com'% fill in email address here<\/p>\n<p>% pattern for temp output file<br \/>\nmyOptions.baseFile = [tempdir 'test'];<\/p>\n<p>% format of output to create<br \/>\nmyOptions.device ='png';<\/p>\n<p>% body of the email message<br \/>\nmyOptions.message = description;<\/p>\n<p>% subject of the email message<br \/>\nmyOptions.subject = ['Output from MATLAB v' version];<\/p>\n<p>% text to put into   tags:  line @bottom of email message<br \/>\nmyOptions.tags = 'MATLAB';<\/p>\n<p>% do I want the temporary files deleted?<br \/>\nmyOptions.delete = 1;<br \/>\nmyOptions<br \/>\n%% export and share<br \/>\nshareIt(myOptions);<br \/>\ndisp('Screen capture shared.  Thank you!')<br \/>\ndisp('In a few minutes you should find it here:')<br \/>\ndisp('http:\/\/www.flickr.com\/photos\/matlabdoug\/')<\/p>\n<p><\/code><br \/>\n<HR><\/p>\n<p>Opening up my Flickr account for all to use is an experiment.  I will be closing the permissions on the account Friday, but the code will still work later if you change the e-mail on line 13 to your Flickr submission address.  Show us what you&#8217;re working on: What&#8217;s in your MATLAB figure right now that you&#8217;d be willing to share with the world?<\/p>\n<p>Usage:<\/p>\n<p>Get your figure ready<br \/>\n>>flickr(&#8216;Description&#8217;)<\/p>\n<p><a class=\"imagelink\" title=flickr.JPG href=\"http:\/\/www.flickr.com\/photos\/matlabdoug\/\"><img decoding=\"async\" id=\"image500\" height=500 lt=flickr.JPG src=\"https:\/\/blogs.mathworks.com\/images\/pick\/flickr.JPG\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go look to the file exchange and you will see some really incredible things people are doing with MATLAB.  Posting code to the File Exchange is a good way to share, but we are always looking for&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2007\/06\/18\/sharing-screenshots-with-flickr\/\">read more >><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/1968"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=1968"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/1968\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=1968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=1968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=1968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}