{"id":27,"date":"2012-06-22T17:38:35","date_gmt":"2012-06-22T17:38:35","guid":{"rendered":"https:\/\/blogs.scummvm.org\/singron\/?p=27"},"modified":"2022-05-23T17:41:08","modified_gmt":"2022-05-23T17:41:08","slug":"2xpm-scaler","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/singron\/2012\/06\/22\/2xpm-scaler\/","title":{"rendered":"2xPM scaler"},"content":{"rendered":"<p>Digitall recently pointed me towards some old patches on the patch tracker for scalers. There I found an old patch for the 2xPM scaler. It is a high quality scaler similar to hq2x. It took a few minutes to copy some files around and to change some variable names, but adding it was painless at first. When I tried to use it, the quality did not look as good as the screenshots I had seen previously. In particular the pattern in the source image:<\/p>\n<pre>#|@|#\r\n#|#|@\r\n#|#|#<\/pre>\n<p>Would scale the center pixel to:<\/p>\n<pre>#|@\r\n@|#<\/pre>\n<p>which made no sense and gave previously sharp edges strange dithering effects.<\/p>\n<p>So I compared the patch to the reference implementation it was based on and realized a few mistakes had been made in the copy-paste. The patch was never accepted, so it was probably never checked too thoroughly.<\/p>\n<p>After fixing that, picture quality improved dramatically. 2xPM is arguably better than hq2x. I have included some images that demonstrate the different scalers. The source image is great because it contains a lot of pixel art in different colors in a variety of configurations.<\/p>\n<div id='gallery-1' class='gallery galleryid-27 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\/Normal2x.png'><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"992\" src=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/Normal2x.png\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-31\" srcset=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/Normal2x.png 1460w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/Normal2x-300x204.png 300w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/Normal2x-1024x696.png 1024w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/Normal2x-768x522.png 768w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/Normal2x-1200x815.png 1200w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-31'>\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\/AdvMame2x.png'><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"992\" src=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/AdvMame2x.png\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-29\" srcset=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/AdvMame2x.png 1460w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/AdvMame2x-300x204.png 300w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/AdvMame2x-1024x696.png 1024w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/AdvMame2x-768x522.png 768w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/AdvMame2x-1200x815.png 1200w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-29'>\n\t\t\t\tAdvMame2x\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\/PM2x.png'><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"992\" src=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/PM2x.png\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-32\" srcset=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/PM2x.png 1460w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/PM2x-300x204.png 300w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/PM2x-1024x696.png 1024w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/PM2x-768x522.png 768w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/PM2x-1200x815.png 1200w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-32'>\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\/HQ2x.png'><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"992\" src=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/HQ2x.png\" class=\"attachment-full size-full\" alt=\"\" aria-describedby=\"gallery-1-30\" srcset=\"https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/HQ2x.png 1460w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/HQ2x-300x204.png 300w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/HQ2x-1024x696.png 1024w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/HQ2x-768x522.png 768w, https:\/\/blogs.scummvm.org\/singron\/wp-content\/uploads\/sites\/38\/2012\/06\/HQ2x-1200x815.png 1200w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-30'>\n\t\t\t\tHQ2x\n\t\t\t\t<\/figcaption><\/figure>\n\t\t<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Digitall recently pointed me towards some old patches on the patch tracker for scalers. There I found an old patch for the 2xPM scaler. It is a high quality scaler similar to hq2x. It took a few minutes to copy some files around and to change some variable names, but adding it was painless at [&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-27","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/posts\/27","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=27"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/posts\/27\/revisions\/33"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/media?parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/categories?post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/singron\/wp-json\/wp\/v2\/tags?post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}