Structure-Aware Pixel Art Scaling via Block Size Detection
Abstract
1. Introduction
- 1.
- We introduce an algorithm to detect the intrinsic block size of a pixel art image and restore it to its original unit grid representation.
- 2.
- We demonstrate that our method significantly expands the range of valid, lossless scaling factors compared to traditional integer scaling, allowing for flexible resizing proportional to the detected block size.
- 3.
- To quantitatively validate our approach, we propose a novel evaluation framework consisting of Color Loss (CL), Block Size Consistency (BSC), and reversibility tests (REVs). Comparative experiments show that our method is the superior solution that preserves both the chromatic and structural integrity of pixel art across an expanded range of scales.
2. Related Works
2.1. Traditional Image Resizing Methods
2.2. Scale2x
2.3. xBRZ
2.4. Implicit Transformer Network (ITSRN)
2.5. Real-ESRGAN
3. Problem Statement
4. Proposed Method
4.1. Block Size and Block
- 1.
- Divisibility Condition: The integer n must be a common divisor of both the image width and height. That is, there must exist positive integers w and h such that
- 2.
- Uniformity Condition: For all integer pairs where and , the color values of all pixels within the corresponding region must be identical. Specifically, for any coordinate satisfyingthe pixel value must be constant.
- 3.
- Maximality Condition: Among all positive integers satisfying conditions 1 and 2, n is the maximum value.
- Figure 9a: A image where each logical point corresponds to a single pixel. Here, .
- Figure 9b: A image where each point corresponds to a pixel area. Since the entire grid aligns perfectly with units, .
- Figure 9c: A image where visual elements form squares. Thus, .
4.2. Block Size Detection Algorithm
| Algorithm 1: Block size detection and image restoration algorithm. |
Input: Input pixel art image I, Width W, Height H |
Output: Intrinsic Block Size n, Minimized Image |
![]() |
- 1.
- Downscaling (Line 3): The input image I is downscaled by a factor of 4 using Nearest Neighbor interpolation. This yields a intermediate image , as shown in Figure 12b.
- 2.
- Restoration (Line 4): To verify integrity, is upscaled back to the original dimensions () by a factor of 4, producing the temporary comparison image (Figure 12c).
- 3.
- 1.
- Downscaling (Line 3): The input I is downscaled by a factor of 2, resulting in an image (Figure 12d). Note that this process effectively normalizes the original pixel blocks into single unit pixels ().
- 2.
- Restoration (Line 4): The image is upscaled back to by a factor of 2, generating Figure 12e.
- 3.
- Comparison (Line 5): Upon comparing Figure 12a,e, the images are found to be identical (). This confirms that the transformation was lossless and that the structural integrity is preserved.
4.3. User-Input Scale Approximation Resizing Algorithm
| Algorithm 2: User-input scale approximation resizing algorithm. |
Input: Input pixel art image I, User-specified scale factor Suser |
Output: Resized Image Iout preserving integrity |
![]() |
- 1.
- 2.
- Approximation (Line 2): The algorithm calculates the target integer scale as follows:(Note: Since , the conditional check in Lines 3–4 is bypassed.)
- 3.
- Resizing (Lines 5–7): The minimized image is scaled up by a factor of 3 using Nearest Neighbor interpolation.
5. Experimental Results
5.1. Performance Metrics
- Column 1 (Reference): Represents the ideal reversible case. Figure 16f shows the difference map between the original image (a) and itself, resulting in an MSE of 0. This serves as the ground truth for lossless resizing.
- Column 2 (Nearest Neighbor): The original image (a) is scaled by using Nearest Neighbor to generate (b), and then restored by to (d). Due to the non-integer scaling, pixels are irregularly duplicated or dropped. The difference map (g) highlights significant structural misalignment, yielding a critically high MSE of 7346.91.
- Column 3 (Bicubic): The image is scaled by using Bicubic interpolation (c) and then restored (e). While the geometric distortion is less severe than Nearest Neighbor, the interpolation introduces smoothing artifacts that permanently alter the pixel values. The difference map (h) visualizes these chromatic errors, resulting in an MSE of 176.55.
5.2. Results and Analysis
5.3. Limitations
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| CL | Color Loss |
| BSC | Block Size Consistency |
| REV | Reversibility Test |
| SF | Scaling Factor |
| n | Block Size |
References
- Samuelson, G. Pixel Art—The Medium of Limitation: A Qualitative Study on How Experienced Artists Perceive the Relationship Between Restrictions and Creativity. Bachelor’s Thesis, Umeå University, Umeå, Sweden, 2020. Available online: http://urn.kb.se/resolve?urn=urn:nbn:se:umu:diva-178771 (accessed on 25 February 2025).
- Bogost, I. How to Do Things with Videogames; University of Minnesota Press: Minneapolis, MN, USA, 2011. [Google Scholar]
- Sookkaew, J.; Suchat, R.; Chaikaew, N. Pixel Art and Its Influence on User Interface Creativity: A Design Perspective. In 2024 8th International Conference on Information Technology (InCIT), Chonburi, Thailand, 14–15 November 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 359–364. [Google Scholar]
- Silber, D. Pixel Art for Game Developers; CRC Press: Boca Raton, FL, USA, 2016. [Google Scholar]
- Kopf, J.; Lischinski, D. Depixelizing pixel art. ACM Trans. Graph. 2011, 30, 99:1–99:8. [Google Scholar] [CrossRef]
- McGuire, M.; Gagiu, M. MMPX style-preserving pixel art magnification. J. Comput. Graph. Tech. 2021, 10, 83–117. [Google Scholar]
- Song, W.; Xu, J.; Zhao, S.; Liu, H.; Shu, H. Development and implementation of pixel art game based on human-computer interaction. In Third International Conference on Intelligent Computing and Human-Computer Interaction (ICHCI 2022), Guangzhou, China, 12–14 August 2022; SPIE: Bellingham, WA, USA, 2023; Volume 12509, p. 1250902. [Google Scholar]
- Matusovic, M.; Parakkat, A.D.; Eisemann, E. Interactive Depixelization of Pixel Art through Spring Simulation. Comput. Graph. Forum 2023, 42, 51–60. [Google Scholar] [CrossRef]
- Berzins, K. Pixel Art Vectorization with Gradients. Bachelor’s Thesis, Delft University of Technology, Delft, The Netherlands, 2025. Available online: http://repository.tudelft.nl/ (accessed on 31 December 2025).
- Liu, Y.; Wang, C.; Lu, M.; Yang, J.; Gui, J.; Zhang, S. From Simple to Complex Scenes: Learning Robust Feature Representations for Accurate Human Parsing. IEEE Trans. Pattern Anal. Mach. Intell. 2024, 46, 5449–5462. [Google Scholar] [CrossRef] [PubMed]
- Wang, C.; Zhang, Q.; Wang, X.; Zhou, L.; Li, Q.; Xia, Z.; Ma, B.; Shi, Y.-Q. Light-Field Image Multiple Reversible Robust Watermarking Against Geometric Attacks. IEEE Trans. Depend. Secur. Comput. 2025, 22, 5861–5875. [Google Scholar] [CrossRef]
- Gonzalez, R.C.; Woods, R.E. Digital Image Processing, 4th ed.; Pearson: New York, NY, USA, 2018. [Google Scholar]
- Meijering, E. A chronology of interpolation: From ancient astronomy to modern signal and image processing. Proc. IEEE 2002, 90, 319–342. [Google Scholar] [CrossRef]
- Keys, R. Cubic convolution interpolation for digital image processing. IEEE Trans. Acoust. Speech Signal Process. 1981, 29, 1153–1160. [Google Scholar] [CrossRef]
- Wolberg, G. Digital Image Warping; IEEE Computer Society Press: Los Alamitos, CA, USA, 1990. [Google Scholar]
- Stasik, P.M.; Balcerek, J. Extensible implementation of reliable pixel art interpolation. Found. Comput. Decis. Sci. 2019, 44, 213–239. [Google Scholar] [CrossRef]
- Mazzoleni, A. Scale2x. 2001. Available online: https://www.scale2x.it (accessed on 11 December 2024).
- Zenju. xBRZ: Scale by Rules—High Quality Image Upscaling Filter. SourceForge. 2012. Available online: https://sourceforge.net/projects/xbrz/ (accessed on 2 February 2025).
- Yang, J.; Shen, S.; Yue, H.; Li, K. Implicit Transformer Network for Screen Content Image Continuous Super-Resolution. In Proceedings of the 35th International Conference on Neural Information Processing Systems (NeurIPS 2021), Online, 6–14 December 2021; Curran Associates Inc.: Red Hook, NY, USA, 2021; pp. 13304–13315. [Google Scholar]
- Wang, X.; Xie, L.; Dong, C.; Shan, Y. Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW), Montreal, QC, Canada, 11–17 October 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1905–1914. [Google Scholar]
- YoYo Games Ltd. Graphics Section in GameMaker: Studio Settings for Windows. 2015. Available online: https://web.archive.org/web/20230402031553/https://help.yoyogames.com/hc/en-us/articles/216753338-GameMaker-Studio-Settings-for-Windows (accessed on 2 February 2025).
- Stasik, P.M.; Balcerek, J. Improvements in upscaling of pixel art. In Proceedings of the 2017 Signal Processing: Algorithms, Architectures, Arrangements, and Applications (SPA), Poznan, Poland, 20–22 September 2017; pp. 371–376. [Google Scholar]
- Gustavson, S. Procedural Textures in GLSL. In OpenGL Insights; Cozzi, P., Riccio, C., Eds.; CRC Press: Boca Raton, FL, USA, 2012; pp. 93–110. [Google Scholar]
- DataGenetics. Pixel Scalers. 2013. Available online: http://www.datagenetics.com/blog/december32013/index.html (accessed on 2 February 2025).
- Azzi, M. Pixel Logic: Pixel Art Tutorials; Self-Published. 2017. Available online: https://pixellogicbook.com (accessed on 3 February 2026).

















| Methods | Scaling Factor | ||||||
|---|---|---|---|---|---|---|---|
| 0.5 | 0.75 | 1.25 | 1.5 | 2.0 | 2.33 | 3.7 | |
| Nearest Neighbor | ![]() 8 × 6 CL: 0% BSC: 0% REV: 13458 | ![]() 11 × 8 CL: 0% BSC: 0% REV: 10471 | ![]() 19 × 14 CL: 0% BSC: 0% REV: 10478 | ![]() 22 × 16 CL: 0% BSC: 59% REV: 10478 | ![]() 30 × 22 CL: 0% BSC: 0% REV: 0 | ![]() 35 × 26 CL: 0% BSC: 44% REV: 10738 | ![]() 56 × 41 CL: 0% BSC: 61% REV: 10478 |
| Bicubic | ![]() 8 × 6 CL: 73% BSC: 0% REV: 4425 | ![]() 11 × 8 CL: 82% BSC: 0% REV: 2662 | ![]() 19 × 14 CL: 77% BSC: 0% REV: 317 | ![]() 22 × 16 CL: 78% BSC: 97% REV: 160 | ![]() 30 × 22 CL: 76% BSC: 97% REV: 48 | ![]() 35 × 26 CL: 77% BSC: 95% REV: 14 | ![]() 56 × 41 CL: 74% BSC: 99% REV: 7 |
| Scale2x [17] | n/a | n/a | n/a | n/a | ![]() 30 × 22 CL: 0% BSC: 100% REV: n/a | n/a | n/a |
| xBRZ [18] | n/a | n/a | n/a | n/a | ![]() 30 × 22 CL: 6% BSC: 100% REV: n/a | n/a | n/a |
| ITSRN [19] | ![]() 8 × 6 CL: 83% BSC: 0% REV: n/a | ![]() 11 × 8 CL: 90% BSC: 0% REV: n/a | ![]() 19 × 14 CL: 81% BSC: 0% REV: n/a | ![]() 22 × 16 CL: 81% BSC: 0% REV: n/a | ![]() 30 × 22 CL: 79% BSC: 99% REV: n/a | ![]() 35 × 26 CL: 80% BSC: 96% REV: n/a | ![]() 56 × 41 CL: 78% BSC: 100% REV: n/a |
| Real-ESRGAN [20] | ![]() 8 × 6 CL: 77% BSC: 0% REV: n/a | ![]() 11 × 8 CL: 89% BSC: 0% REV: n/a | ![]() 19 × 14 CL: 94% BSC: 0% REV: n/a | ![]() 22 × 16 CL: 93% BSC: 100% REV: n/a | ![]() 30 × 22 CL: 93% BSC: 100% REV: n/a | ![]() 35 × 26 CL: 92% BSC: 100% REV: n/a | ![]() 56 × 41 CL: 88% BSC: 100% REV: n/a |
| Proposed Method | ![]() 15 × 11 CL: 0% BSC: 0% REV: 0 | ![]() 15 × 11 CL: 0% BSC: 0% REV: 0 | ![]() 15 × 11 CL: 0% BSC: 0% REV: 0 | ![]() 30 × 22 CL: 0% BSC: 0% REV: 0 | ![]() 30 × 22 CL: 0% BSC: 0% REV: 0 | ![]() 30 × 22 CL: 0% BSC: 0% REV: 0 | ![]() 60 × 44 CL: 0% BSC: 0% REV: 0 |
| Methods | Scaling Factor | ||||||
|---|---|---|---|---|---|---|---|
| 0.5 | 0.75 | 1.25 | 1.5 | 2.0 | 2.33 | 3.7 | |
| Nearest Neighbor | ![]() 21 × 14 CL: 0% BSC: 69% REV: 8151 | ![]() 32 × 20 CL: 0% BSC: 46% REV: 8570 | ![]() 52 × 34 CL: 0% BSC: 70% REV: 7347 | ![]() 63 × 40 CL: 0% BSC: 65% REV: 6211 | ![]() 84 × 54 CL: 0% BSC: 0% REV: 0 | ![]() 98 × 63 CL: 0% BSC: 0% REV: 0 | ![]() 155 × 100 CL: 0% BSC: 83% REV: 7511 |
| Bicubic | ![]() 21 × 14 CL: 40% BSC: 93% REV: 1490 | ![]() 32 × 20 CL: 39% BSC: 89% REV: 804 | ![]() 52 × 34 CL: 32% BSC: 97% REV: 122 | ![]() 63 × 40 CL: 27% BSC: 95% REV: 60 | ![]() 84 × 54 CL: 8% BSC: 98% REV: 32 | ![]() 98 × 63 CL: 4% BSC: 98% REV: 32 | ![]() 155 × 100 CL: 20% BSC: 98% REV: 4 |
| Scale2x [17] | n/a | n/a | n/a | n/a | ![]() 84 × 54 CL: 0% BSC: 65% REV: n/a | n/a | n/a |
| xBRZ [18] | n/a | n/a | n/a | n/a | ![]() 84 × 54 CL: 1% BSC: 56% REV: n/a | n/a | n/a |
| ITSRN [19] | ![]() 21 × 14 CL: 90% BSC: 100% REV: n/a | ![]() 32 × 20 CL: 82% BSC: 99% REV: n/a | ![]() 52 × 34 CL: 61% BSC: 99% REV: n/a | ![]() 63 × 40 CL: 61% BSC: 99% REV: n/a | ![]() 84 × 54 CL: 52% BSC: 100% REV: n/a | ![]() 98 × 63 CL: 53% BSC: 100% REV: n/a | ![]() 155 × 100 CL: 50% BSC: 100% REV: n/a |
| Real-ESRGAN [20] | ![]() 21 × 14 CL: 89% BSC: 95% REV: n/a | ![]() 32 × 20 CL: 90% BSC: 93% REV: n/a | ![]() 52 × 34 CL: 89% BSC: 94% REV: n/a | ![]() 63 × 40 CL: 88% BSC: 94% REV: n/a | ![]() 84 × 54 CL: 85% BSC: 97% REV: n/a | ![]() 98 × 63 CL: 83% BSC: 96% REV: n/a | ![]() 155 × 100 CL: 75% BSC: 97% REV: n/a |
| Proposed Method | ![]() 28 × 18 CL: 0% BSC: 0% REV: 0 | ![]() 28 × 18 CL: 0% BSC: 0% REV: 0 | ![]() 56 × 36 CL: 0% BSC: 0% REV: 0 | ![]() 70 × 45 CL: 0% BSC: 0% REV: 0 | ![]() 84 × 54 CL: 0% BSC: 0% REV: 0 | ![]() 98 × 63 CL: 0% BSC: 0% REV: 0 | ![]() 154 × 99 CL: 0% BSC: 0% REV: 0 |
| Block Size | Scaling Factor | ||
|---|---|---|---|
| 1.0 | 2.0 | 3.0 | |
| 1 | 1 | 2 | 3 |
| 2 | |||
| 3 | |||
| ⋮ | ⋮ | ⋮ | ⋮ |
| n | |||
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Seo, J.W.; Lee, J.W.; Lee, J.H.; Kim, J.B.; Jung, J.-W. Structure-Aware Pixel Art Scaling via Block Size Detection. Appl. Sci. 2026, 16, 2314. https://doi.org/10.3390/app16052314
Seo JW, Lee JW, Lee JH, Kim JB, Jung J-W. Structure-Aware Pixel Art Scaling via Block Size Detection. Applied Sciences. 2026; 16(5):2314. https://doi.org/10.3390/app16052314
Chicago/Turabian StyleSeo, Jun Won, Jun Won Lee, Jong Hyuck Lee, Jun Beom Kim, and Jin-Woo Jung. 2026. "Structure-Aware Pixel Art Scaling via Block Size Detection" Applied Sciences 16, no. 5: 2314. https://doi.org/10.3390/app16052314
APA StyleSeo, J. W., Lee, J. W., Lee, J. H., Kim, J. B., & Jung, J.-W. (2026). Structure-Aware Pixel Art Scaling via Block Size Detection. Applied Sciences, 16(5), 2314. https://doi.org/10.3390/app16052314












































































