{"id":6182,"date":"2011-03-27T11:04:19","date_gmt":"2011-03-27T15:04:19","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=6182"},"modified":"2011-03-27T11:07:07","modified_gmt":"2011-03-27T15:07:07","slug":"chroma-key-screen-grabs","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2011\/03\/27\/chroma-key-screen-grabs\/","title":{"rendered":"chroma key screen grabs"},"content":{"rendered":"<p>Oddly-shaped windows are a pain to screen grab. <a href=\"http:\/\/netpbm.sourceforge.net\/\">Netpbm<\/a> to the rescue!<\/p>\n<ol>\n<li>Make a blue (or green, or whatever isn&#8217;t used in your window) image larger than the window, like <a title=\"800 x 600, blue\" href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2011\/03\/b.png\">this<\/a>:\n<pre>ppmmake blue 800 600 | pnmtopng &gt; ~\/Desktop\/b.png<\/pre>\n<\/li>\n<li>Display the image, and arrange your program in front of it.<\/li>\n<li>Take a screenshot.<\/li>\n<li>Crop the image, and set the background transparent.\n<pre>pngtopnm Screen\\ shot\\ 2011-03-27\\ at\\ 10.12.52\\ .png |\\\r\n pnmcrop |\\\r\n pnmtopng -transparent blue &gt; ICP-2007.png<\/pre>\n<\/li>\n<\/ol>\n<p>Ta-dah!<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6180 aligncenter\" title=\"ICP-2007\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2011\/03\/ICP-2007.png\" alt=\"\" width=\"640\" height=\"480\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2011\/03\/ICP-2007.png 640w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2011\/03\/ICP-2007-160x120.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2011\/03\/ICP-2007-320x240.png 320w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>(and yeah, this is a Windows program running under <a href=\"http:\/\/www.winehq.org\/\">Wine<\/a> on OS X &#8230;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oddly-shaped windows are a pain to screen grab. Netpbm to the rescue! Make a blue (or green, or whatever isn&#8217;t used in your window) image larger than the window, like this: ppmmake blue 800 600 | pnmtopng &gt; ~\/Desktop\/b.png Display the image, and arrange your program in front of it. Take a screenshot. Crop the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[2287,809,1478],"class_list":["post-6182","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-cso","tag-netpbm","tag-screenshot"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-1BI","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/6182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=6182"}],"version-history":[{"count":3,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/6182\/revisions"}],"predecessor-version":[{"id":6184,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/6182\/revisions\/6184"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=6182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=6182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=6182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}