Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scaling without quality loss
#1
Dear all,



I have a pixelart image that I try to scale in gimp. This is probably just a button I need to toggle, but I have searched for more than an hour (also on this forum and on Google) but I have yet to find the answer.

When I try to scale the image everything goes well, but when I click enter it suddenly loses a huge amount of quality.


I added the unscaled image, scaled image before clicking enter and scaled image after clicking enter.



Many, many thanks in advance!!!


Attached Files Thumbnail(s)
           
Reply
#2
Generally if you want to scale pixel art and keep the hard edges, set the scale interpolation to none.
Otherwise you get antialiasing.

   
Reply
#3
(01-20-2021, 12:27 PM)rich2005 Wrote: Generally if you want to scale pixel art and keep the hard edges, set the scale interpolation to none.
Otherwise you get antialiasing.

Thank you for your reply!

I should have specified that I am trying to downscale the image. When I use your technique it works with upscaling indeed, but not with downscaling. I still get the blurry third image.
Reply
#4
Too many screenshots so see this combined image:  https://i.imgur.com/Jxn94XW.jpg

Scale a single pixel down and you risk losing the pixel. It would have been better if you posted the original rather than screenshots.  A bit of pixel measuring and I think the first screenshot is x4. (1) No matter, I extracted that to an image without the background, which gave an image about 450x400 pix.

What sort of size in pixels are you hoping to end up with?  You might get result by converting to a vector image. (2) A vector can scale up and down, best used for logos but works to a certain extent with your graphic. If you have lots of these to process, install Inkscape, for the occasional bitmap -> svg there are free online converters.

Importing the svg into Gimp and it initially shows the original size (3) but change that to scale up or down, I think that anything less than 40 pix (4) might be a step too far.

That gets a small image in Gimp with some detail and in this case some of the pixels are semi-transparent (5) Improve that using Layer -> Transparency -> Semi-Flatten  setting black as the colour. (6)

Attached the svg (unzip it) for you to play with, but please do experiment.


Attached Files
.zip   svg.zip (Size: 23.52 KB / Downloads: 97)
Reply
#5
(01-20-2021, 02:34 PM)rich2005 Wrote: Too many screenshots so see this combined image:  https://i.imgur.com/Jxn94XW.jpg

Scale a single pixel down and you risk losing the pixel. It would have been better if you posted the original rather than screenshots.  A bit of pixel measuring and I think the first screenshot is x4. (1) No matter, I extracted that to an image without the background, which gave an image about 450x400 pix.

What sort of size in pixels are you hoping to end up with?  You might get result by converting to a vector image. (2) A vector can scale up and down, best used for logos but works to a certain extent with your graphic. If you have lots of these to process, install Inkscape, for the occasional bitmap -> svg there are free online converters.

Importing the svg into Gimp and it initially shows the original size (3) but change that to scale up or down, I think that anything less than 40 pix (4) might be a step too far.

That gets a small image in Gimp with some detail and in this case some of the pixels are semi-transparent (5) Improve that using Layer -> Transparency -> Semi-Flatten  setting black as the colour. (6)

Attached the svg (unzip it) for you to play with, but please do experiment.

Hello Rich,


Thank you so much for your detailed reply!

Though, I am still confused as to why the end result should have a quality loss. Number (6) in your combined image has less pixels than number (1). Is it not possible to keep the same amount of pictures, but just make the image smaller? It seems like it should be possible, because that is what the scale tool does before you press enter (as in my third added picture).


Thank you very much!!
Reply
#6
No, think about it. If you have an image 100 x 100 = 10,000 pixels and scale it down to a quarter to 25 x 25 = 625 pixels That is a great reduction in image quality. Blocks of pixels will reduce their area but lines made of 1 or 2 pixels are liable to vanish, scaled down to nothing. A pixel is the basic building block whatever the image size.

What you see on the screen is a representation of the result, just the same as zoom-ing in and out. Once you fix it then you lose those pixels.
Reply
#7
If the result with gimp is not as satisfied then you can use reshade, it's free to use : https://www.reshade.com

   
   
Reply


Forum Jump: