{"id":34,"date":"2012-06-29T17:41:11","date_gmt":"2012-06-29T17:41:11","guid":{"rendered":"https:\/\/blogs.scummvm.org\/singron\/?p=34"},"modified":"2022-05-23T17:43:58","modified_gmt":"2022-05-23T17:43:58","slug":"edge2x-3x-scaler","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/singron\/2012\/06\/29\/edge2x-3x-scaler\/","title":{"rendered":"Edge2x\/3x scaler"},"content":{"rendered":"<p>So this week I added the Edge2x\/3x scaler. It is the most complex scaler yet, producing the highest quality images and being the most cpu greedy.<\/p>\n<p>It had some pretty ingenious heuristics to detect the entire source image, see exactly what pixels had changed and only update the relevant regions. Of course this was originally written years ago so this kind of hack is not necessary, and I have disabled it. On my laptop, everything seems smooth as long as it is compiled with optimization. Without, it is quite jerky (the compiler must be doing something right). However I am considering adding optional access to the old source image as part of the scaler api so all those hacks would not be necessary.<\/p>\n<p>So here are some comparisons. Click to see larger versions.<\/p>\n<div id='gallery-1' class='gallery galleryid-34 gallery-columns-1 gallery-size-full'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/normal.png'><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/normal.png\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-38\" srcset=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/normal.png 640w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/normal-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-38'>\n\t\t\t\tNormal2x\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/hq.png'><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/hq.png\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-37\" srcset=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/hq.png 640w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/hq-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-37'>\n\t\t\t\tHQ2x\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/pm.png'><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/pm.png\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-39\" srcset=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/pm.png 640w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/pm-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-39'>\n\t\t\t\tPM2x\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/edge.png'><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/edge.png\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-36\" srcset=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/edge.png 640w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/edge-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-36'>\n\t\t\t\tEdge2x\n\t\t\t\t<\/figcaption><\/figure>\n\t\t<\/div>\n\n<p>Notice that the Edge2x scaler manages to anti alias almost every edge whereas the other scalers tend to miss some. In particular, look at the roundness of the coins and the features of Guybrush&#8217;s body.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So this week I added the Edge2x\/3x scaler. It is the most complex scaler yet, producing the highest quality images and being the most cpu greedy. It had some pretty ingenious heuristics to detect the entire source image, see exactly what pixels had changed and only update the relevant regions. Of course this was originally [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":4,"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":43,"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/posts\/34\/revisions\/43"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}