I see it said pretty much everywhere that you can't upscale a non vector image without some lossiness and blur, but how does the zoom tool work differently?

Example: I'm trying to make this: enter image description here about twice as big.

When using the zoom tool in a program like GIMP or Paint.NET or Picture Viewer, there is very little blurriness even when made much bigger, as shown here: enter image description here

But when I use the scale tool in GIMP on any of Cubic, Linear or Sinc mode, the image becomes blurry, particularly the edges of each "pixel".

I guess using the zoom tool and printscreen>paste into a new window is ONE solution, but is it the only/best one?

  • What you want is called either box filtering ( but only on upscaling does it work like this) or nearest neighbour filtering. But yes the filter you chose would do that.
    – joojaa
    May 25 '17 at 5:58
  • 3
    Possible duplicate of How can I 'blow up' small pixel art?
    – Cai
    May 25 '17 at 6:35

Using Interpolation: None instead of Cubic, Linear, or Sinc gave me the results I was looking for.

  • 1
    And this is what the Zoom effectively does, too. May 26 '17 at 0:01

Try to shrink this:

enter image description here

It's easier than making something bigger.

The black outline need some manual work to make it blocky if it's wanted. But test, if this is useful. The white fill should be exact - it's not copied from elswhere, it's from your image, only the anti-aliasing is quessed and taken back. It didn't work perfecly to the outline that had sharp blocky outer edges. I put a new smooth outline.

NOTE: Download this PNG, if you copy and paste it, the result is random. Probably you lose the transparent background.

The receipe:

Your original small r was enlargened to 800% pixel dimensions. There are many good resizing programs that quess the missing details and can take back some obvious anti-aliasing. On1 Perfect Resize was used here. The result:

enter image description here

The outline isn't especially nice, but there was no glue to do it otherwise. The interior was anti-aliased. On1's resizer by default thinks the interior has originally had a sharp edge.

I selected the interior, smoothed the selection (not blurred nor feathered) and painted it full white. Then I took the interior to Inkscape (=Ctrl+C, Ctrl+V)

In Inkscape I traced the interior with default settings. See the following cartoon:

enter image description here

  1. The enlargened r with whitened interior. This was not traced!

  2. The interior after the tracing, turned to black and a thick black stroke was inserted

  3. The interior after the tracing, only white fill, no stroke

  4. this is 3 and 2 piggybacked, the same as already offered to be shrinked

ADDENDUM: On1 Resizer is a high cost program. There's also usable freeware. I have tried Smilla Enlarger. https://sourceforge.net/projects/imageenlarger/

Its results are a little softer than On1's. But they can be sharpened. Smilla seemingly tries to quess also what's behind the blocky outline of your r. Heres a enlargening result which is made in Smilla and then made sharp in GIMP.

NOTE: This is bitmap, no tracing attempted.

enter image description here


You will achieve the best possible result increasing the size of the image so that it becomes 4 times as much. The simple explanation is that doing so, every pixel will be drawn on 4, and there will be no processing or alteration of the image that you can't control. An example of this is seen when projecting an HD image on a 4K screen.


I see it said pretty much everywhere that you can't upscale a non vector image without some lossiness and blur

That is a gross oversimplification.

What is however true is that you have to "fill in the gaps" somehow. There are many ways of going this, which will produce different results. It's impossible for any scaling algorithm to know for sure what was supposed to be in the gaps in the mind of the original artist.

The simplest way to fill in the gaps is "nearest neighbor" (sometimes known as "none"), you transform the output coordinates to the input coordinates and then look up the closest pixel. This tends to look "blocky", especially for non-integer scale ratios. This is usually what is used for "zoom" tools for a couple of reasons, firstly because when working on an image it can be desirable to actually see the individual pixels, secondly because it's fast.

The "linear", "cubic" and "sinc" options all work on the assumption that the pixels in your image are samples of some continuous 2D function that can and should be interpolated. The result is blurriness rather than blockiness.

But there also exist dedicated scaling algorithms for "pixel art", instead of assuming the pixels are samples of some continuous function, these assume that at least some of the pixels are trying to produce hard-edged lines and shapes. Sometimes there is a color threshold where similar-colored pixels are assumed to implement dithering and blurred, while pixels with very distinct colors are assumed to represent deliberate edges. These often work best when the original images were not anti-aliased.

And then there are tools that can go the whole way and automatically trace bitmaps to produce vectors. Inkscape has a couple of different options available (afaict there is a general-purpose one and one specifically optimised for pixel art), and there are options in commercial packages too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.