{"id":1752,"date":"2007-07-14T11:21:49","date_gmt":"2007-07-14T15:21:49","guid":{"rendered":"http:\/\/cleek.lunarpages.com\/blogs\/?p=1752"},"modified":"2007-07-14T11:21:49","modified_gmt":"2007-07-14T15:21:49","slug":"illusion","status":"publish","type":"post","link":"https:\/\/ok-cleek.com\/blogs\/?p=1752","title":{"rendered":"Illusion"},"content":{"rendered":"<p><img decoding=\"async\" src=\"\/images\/illusion_square.gif\"><br \/>\nThat square was drawn like this:<\/p>\n<ol>\n<li>start with a rectangle that's the full size of the image. fill it with white.\n<li>pick a starting gray value of X = 0 (a.k.a. black)\n<li>draw a single-pixel rectangle with a gray value of X all around that rectangle\n<li>make a new rectangle that's one pixel inside the previous (ie. the sides are adjacent to the previous, but one pixel closer to the center)\n<li>draw a single-pixel rectangle with a gray value of X+7 (one step lighter) all around the edge of that rectangle.\n<li>go to 3, while X is less than 255 (a.k.a white)\n<\/ol>\n<p>So, it's just a series of nested rectangles, each one pixel smaller than the last, each of a single gray level.<\/p>\n<p>But look in the corners, at those lighter-colored rays that seem to point into the corners. Where do they come from? Again, each rectangle is a single solid color; it doesn't get brighter at the corners. <\/p>\n<p>Here's a zoom of about 20x:<br \/>\n<img decoding=\"async\" src=\"\/images\/illusion_square_zoom.gif\"><br \/>\nThe illusion is present here, too. But, if you take that image into your favorite photo editor or color picker, you'll see that each of those bands of color is uniform: they do not get lighter at the corners, nor do they get darker on their inside edge (remember the bands in the zoomed image are really one-pixel wide in the original - the lighter inside edges are <em>another<\/em> illusion).<\/p>\n<p>It's not a mere curiosity, to me. I'm trying to find a simple way to fade the edges of an image to a solid background color. But this illusion, or effect, shows up even when the pixels aren't solid gray - it affects real-life images, too. And it's annoying.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>That square was drawn like this: start with a rectangle that's the full size of the image. fill it with white. pick a starting gray value of X = 0 (a.k.a. black) draw a single-pixel rectangle with a gray value of X all around that rectangle make a new rectangle that's one pixel inside the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1752","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/ok-cleek.com\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/1752","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ok-cleek.com\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ok-cleek.com\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ok-cleek.com\/blogs\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ok-cleek.com\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1752"}],"version-history":[{"count":0,"href":"https:\/\/ok-cleek.com\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/1752\/revisions"}],"wp:attachment":[{"href":"https:\/\/ok-cleek.com\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ok-cleek.com\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ok-cleek.com\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}