{"id":57025,"date":"2026-08-28T03:01:57","date_gmt":"2026-08-27T17:01:57","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=57025"},"modified":"2026-07-26T14:10:13","modified_gmt":"2026-07-26T04:10:13","slug":"photobooth-shaving-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/photobooth-shaving-primer-tutorial\/","title":{"rendered":"PhotoBooth Shaving Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"https:\/\/www.rjmprogramming.com.au\/Mac\/shaving.jpeg\" rel=\"noopener\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PhotoBooth Shaving Primer Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/Mac\/shaving.jpeg\" title=\"PhotoBooth Shaving Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">PhotoBooth Shaving Primer Tutorial<\/p><\/div>\n<p>We wonder about whether <i>Primer<\/i> is apt in today&#8217;s blog posting &#8220;PhotoBooth Shaving Primer Tutorial&#8221; title, but perhaps your first shave is the go here?!<\/p>\n<p>We don&#8217;t like mirrors much.  Anyway, today, we don&#8217;t want to mess up the bathroom sink, below our mirror.<\/p>\n<p>So supposing we do want to shave and can satisfy &#8230;<\/p>\n<table cellspacing=20 cellpadding=20 border=20>\n<tr>\n<td><input type=checkbox checked><\/input><\/td>\n<td>Razor (and can work off batteries, perhaps optional?!)<\/td>\n<\/tr>\n<tr>\n<td><input type=checkbox checked><\/input><\/td>\n<td>macOS laptop (ie. you can access to <a target=\"_blank\" title='Mac OS X apps out of the box' href='https:\/\/support.apple.com\/kb\/PH18738' rel=\"noopener\">Photobooth<\/a> we talked about with <a title='Webcam Photobooth Tutorial' href='#wpt'>Webcam Photobooth Tutorial<\/a>) <font size=1>(or mobile device with its Camera app)<\/font><\/td>\n<\/tr>\n<tr>\n<td><input type=checkbox><\/input><\/td>\n<td>Mirror<\/td>\n<\/tr>\n<\/table>\n<p>?  Well, you &#8230;<\/p>\n<ol>\n<li>open PhotoBooth <font size=1>(or mobile device Camera app)<\/font><\/li>\n<li>turn camera mode to selfie<\/li>\n<li>start up the shaver as you look at the laptop <font size=1>(or mobile device)<\/font><\/li>\n<li><strike><a target=\"_blank\" title='?' href='https:\/\/www.google.com\/search?gs_ssp=eJzj4tLP1TdISS82KzI1YPQSSCrKLMkszlBISsxOVchPSwMAj2gJuQ&#038;q=british+bake+off&#038;rlz=1C5CHFA_enAU973AU973&#038;oq=british+bake+off&#038;aqs=chrome.1.0i271j46i131i433i512j0i131i433i512j0i512l2j46i512j0i512l4.8150j0j4&#038;sourceid=chrome&#038;ie=UTF-8' rel=\"noopener\">Bake!<\/a><\/strike><a target=\"_blank\" href=\"https:\/\/www.rjmprogramming.com.au\/Mac\/shaving.jpeg\" title=\"Tutorial picture\" rel=\"noopener\">Shave!<\/a><\/li>\n<\/ol>\n<p>Cute, huh?!  And we do not require payment for this weight loss tip?!<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=\"_blank\" href='\/\/www.rjmprogramming.com.au\/ITblog\/photobooth-shaving-primer-tutorial\/' rel=\"noopener\">PhotoBooth Shaving Primer Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wpt'>Previous relevant <a target=\"_blank\" title='Webcam Photobooth Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/webcam-photobooth-tutorial\/' rel=\"noopener\">Webcam Photobooth Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"https:\/\/www.rjmprogramming.com.au\/webcamtest\/index.html\" rel=\"noopener\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Webcam Photobooth Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/webcamtest\/webcamtest.png\" title=\"Webcam Photobooth Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Webcam Photobooth Tutorial<\/p><\/div>\n<p>The <a target=\"_blank\" href='https:\/\/en.wikipedia.org\/wiki\/Webcam' title='Webcam information from Wikipedia ... thanks' rel=\"noopener\">webcam<\/a> of a computer device can be like a video selfie except that when filming something it can be flipped horizontally, like when dealing with mirrors, on occasions, especially after a heavy night!  And that&#8217;s where the Mac OS X (and iOS) <a target=\"_blank\" title='Mac OS X apps out of the box' href='https:\/\/support.apple.com\/kb\/PH18738' rel=\"noopener\">Photobooth<\/a> desktop (or mobile &#8220;desktop&#8221;) application comes to our thinking.  It has a very useful option <i>Edit &gt; Auto Flip New Items<\/i>, a simulation of functionality we&#8217;d like to add onto the web application of our previous <a title='Webcam Primer Tutorial' href='#wpt'>Webcam Primer Tutorial<\/a> as shown below.  The thought of doing all this to the implicit video of the Webcam sounds daunting, but the clue to this being easier than expected came from the &#8220;bowels&#8221; of that previous tutorial, basing itself on the help of a few excellent links you can link into below too, and its use of an HTML(5) canvas element to be an intermediary between the webcam (video) and your dear little selves.  And it is on this canvas (sounds apt to say &#8220;palette&#8221; today) that there are tremendous HTML5 &#8220;goodies&#8221; functionality-wise to call on to be able to &#8230;<\/p>\n<ul>\n<li><a target=\"_blank\" href='https:\/\/www.w3schools.com\/tags\/canvas_scale.asp' title='HTML(5) canvas element scale method information from w3schools' rel=\"noopener\">scale<\/a><\/li>\n<li><a target=\"_blank\" href='https:\/\/www.w3schools.com\/tags\/canvas_rotate.asp' title='HTML(5) canvas element rotate method information from w3schools' rel=\"noopener\">rotate<\/a><\/li>\n<li><a target=\"_blank\" href='https:\/\/www.w3schools.com\/tags\/canvas_translate.asp' title='HTML(5) canvas element translate method information from w3schools' rel=\"noopener\">translate<\/a><\/li>\n<\/ul>\n<p> &#8230; and so, effectively (horizontally) &#8220;flip&#8221; (or also today&#8217;s &#8220;we didn&#8217;t know&#8221; flop (meaning vertically flip)) the canvas right there in the middle of the action, doing twirls and triple pikes just for you gals and guys &#8230; awwwww, shucks!  This ability of our Webcam application was precisely what was missing as we lamented in yesterday&#8217;s <a title='Windows Memory Stick Research Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/windows-memory-stick-research-primer-tutorial\/'>Windows Memory Stick Research Primer Tutorial<\/a> &#8230;<\/p>\n<blockquote cite='https:\/\/www.rjmprogramming.com.au\/ITblog\/windows-memory-stick-research-primer-tutorial\/'><p>\nThe YouTube\u2019s genesis was from the Mac OS X desktop application PhotoBooth, mainly done this way because of its excellent Edit -&gt; Auto Flip New Items option, otherwise we\u2019d have used our recent Webcam web application.\n<\/p><\/blockquote>\n<p>We&#8217;d like to thank <a target=\"_blank\" title='Useful link, thanks' href='http:\/\/stackoverflow.com\/questions\/3129099\/how-to-flip-images-horizontally-with-html5' rel=\"noopener\">this webpage<\/a> for a great Javascript function to manipulate our HTML(5) canvas element this way.<\/p>\n<p>This opens our web application up to allowing you to use a Webcam to show a &#8220;filmed&#8221; thing in an unmirrored context, and so, if you, as we did today with our YouTube video &#8230;<\/p>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/kpMSroD06ys\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p> &#8230; <i>record<\/i> this from afar, as we did with an iPad Camera app&#8217;s Video mode, it will appear the correct way around, as the Photobooth application can also do, and was the genesis of our inspiration to do today.<\/p>\n<p>We&#8217;ll leave you the HTML and Javascript code we&#8217;ve got those <strike>three<\/strike> four links <strike>above<\/strike> to thank for, mainly.  The code can be downloaded and\/or perused via the <a target=\"_blank\" title='webcamtest.html' href='http:\/\/www.rjmprogramming.com.au\/webcamtest\/webcamtest.html-GETME' rel=\"noopener\">webcamtest.html<\/a> (https:) source code link, that changed for today&#8217;s purposes in <a target=\"_blank\" title='webcamtest.html' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/webcamtest\/webcamtest.html-GETME' rel=\"noopener\">this way<\/a>. To try it out for yourself, if your computer device suits, try this <a target=\"_blank\" title='Click picture' href='https:\/\/www.rjmprogramming.com.au\/webcamtest\/webcamtest.html' rel=\"noopener\">live run<\/a> link.<\/p>\n<hr>\n<p id='wpt'>Previous relevant <a target=\"_blank\" title='Webcam Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/webcam-primer-tutorial\/' rel=\"noopener\">Webcam Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"https:\/\/www.rjmprogramming.com.au\/webcamtest\/index.html\" rel=\"noopener\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Webcam Primer Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/webcamtest\/webcamtest.jpg\" title=\"Webcam Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Webcam Primer Tutorial<\/p><\/div>\n<p>The <a target=\"_blank\" href='https:\/\/en.wikipedia.org\/wiki\/Webcam' title='Webcam information from Wikipedia ... thanks' rel=\"noopener\">webcam<\/a> of a computer device can be a very useful piece of hardware.  We&#8217;ve written an &#8220;entry level&#8221; web application using your device&#8217;s webcam, should it have one, and should you give permission for the web application to access it, and if the web browser and platform combination you use suits some or all of the functionality offered in this first draft.  We would like to thank three great online resources for the code stitched together for this first draft web application, those being &#8230;<\/p>\n<ol>\n<li><a target=\"_blank\" title='https:\/\/www.kirupa.com\/html5\/accessing_your_webcam_in_html5.htm' href='https:\/\/www.kirupa.com\/html5\/accessing_your_webcam_in_html5.htm' rel=\"noopener\">www.kirupa.com<\/a> link taught us about the getUserMedia method of the navigator object &#8230;<\/li>\n<li><a target=\"_blank\" title='https:\/\/software.intel.com\/en-us\/html5\/hub\/blogs\/using-the-getusermedia-api-with-the-html5-video-and-canvas-elements' href='https:\/\/software.intel.com\/en-us\/html5\/hub\/blogs\/using-the-getusermedia-api-with-the-html5-video-and-canvas-elements' rel=\"noopener\">software.intel.com<\/a> link helped us with code and event logic allowing for a 33mS refresh of the webcam&#8217;s underlying <a target=\"_blank\" href='https:\/\/www.w3schools.com\/html\/html5_video.asp' title='HTML video element information from w3schools' rel=\"noopener\">video<\/a> to an HTML(5) <a target=\"_blank\" href='https:\/\/www.w3schools.com\/html\/html5_canvas.asp' title='HTML(5) canvas element information from w3schools' rel=\"noopener\">canvas<\/a> element, along with a greyscale manipulation of that canvas element&#8217;s &#8220;snapshot in time&#8221; contents<\/li>\n<li><a target=\"_blank\" href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Canvas_API\/Tutorial\/Pixel_manipulation_with_canvas' title='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Canvas_API\/Tutorial\/Pixel_manipulation_with_canvas' rel=\"noopener\">developer.mozilla.org<\/a> link helped us with some other image within canvas pixel level functionalities such as colour reversal, and zooming in ((like a magnifier) as you see often on eCommerce product pages) and an individual canvas pixel rgba(r,g,b,opacity) report<\/li>\n<\/ol>\n<p>None of this functionality calls on anything else but HTML(5) and Javascript &#8220;smarts&#8221;, and is eye opening in that way, no doubt.<\/p>\n<p>And so today&#8217;s first draft is mainly about the webcam (hardware) &#8220;capture&#8221; capabilities, its &#8220;conduit&#8221; to the outside world &#8230; that being you user gals and guys &#8230; say hello &#8230; is that curious and exciting notion that you capture the webcam video <a target=\"_blank\" href='https:\/\/en.wikipedia.org\/wiki\/Streaming_media' title='Media streaming information from Wikipedia ... thanks' rel=\"noopener\">streaming<\/a> &#8220;snapshot&#8221; fast enough into a canvas element, it looks like you are just dealing with a &#8220;magical&#8221; canvas, though the (usually green) webcam light on your device (and the web browser tab (usually red) light, and any other web browser webcam icons shown) should be the giveaway that a webcam underpins the goings on.<\/p>\n<p>There are cross-platform and cross-browser issues with webcams, that is for sure.  Maybe you&#8217;ve gone and clicked the <a target=\"_blank\" title='Click picture' href='https:\/\/www.rjmprogramming.com.au\/webcamtest\/webcamtest.html' rel=\"noopener\">live run<\/a> equivalent of clicking the tutorial&#8217;s picture, already, above, and noticed a slightly different pattern of arrangement to our usual.  We direct you to an https: URL, because the Google Chrome web browser asks for this type of URL to go with allowing permission to access the device&#8217;s webcam.<\/p>\n<p>And so that leaves us to show you the HTML and Javascript code we&#8217;ve got those three links above to thank for, mainly.  The code can be downloaded and\/or perused via the <a target=\"_blank\" title='webcamtest.html' href='https:\/\/www.rjmprogramming.com.au\/webcamtest\/webcamtest.html_GETME' rel=\"noopener\">webcamtest.html<\/a> (https:) source code link.  We also direct you to a video we made for you to visualize all this, below &#8230;<\/p>\n<p><video controls><source type='video\/mp4' src=\"https:\/\/www.rjmprogramming.com.au\/webcamtest\/webcamtest.m4v\"><\/source><\/video><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d29927' onclick='var dv=document.getElementById(\"d29927\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/webcam\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d29927' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d30150' onclick='var dv=document.getElementById(\"d30150\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/photobooth\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d30150' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d57025' onclick='var dv=document.getElementById(\"d57025\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/camera\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d57025' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We wonder about whether Primer is apt in today&#8217;s blog posting &#8220;PhotoBooth Shaving Primer Tutorial&#8221; title, but perhaps your first shave is the go here?! We don&#8217;t like mirrors much. Anyway, today, we don&#8217;t want to mess up the bathroom &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/photobooth-shaving-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,1,37],"tags":[183,319,4087,322,2178,795,927,4090,4088,4089,1284,1319],"class_list":["post-57025","post","type-post","status-publish","format-standard","hentry","category-elearning","category-uncategorised","category-tutorials","tag-camera","tag-desktop","tag-desktop-app","tag-device","tag-macos","tag-mobile","tag-photobooth","tag-selfie","tag-shave","tag-shaving","tag-tips","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/57025"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=57025"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/57025\/revisions"}],"predecessor-version":[{"id":64288,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/57025\/revisions\/64288"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=57025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=57025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=57025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}