Search code examples
gimp

How do I scale part of an image and prevent it from dithering so I have a hard edge to it?


I am trying to take apart a larger image in gimp and make it a bunch of images. To do this I am selecting the part of the image I want and pasting it into a new image. I then need to resize it and make it much larger (about a factor of 9-10).

So when I have the object pasted and anchored down, I then can select by color what I've pasted (transparent background) and do a transform -> scale to get it to the appropriate size. Once it is scaled it has a selection outline that is perfect for what I want but the colored pixels dither to either side of that selection. What I want is to be able to save that selection or just anchor it down so that there is no dithering. the inside is one color and the outside stays transparent. Can someone suggest a method of doing that?


Solution

  • Try Layer>Transparency>Threshold alpha on the result. But this won't be pretty.

    But if you are copying/scaling areas with a uniform color, a better technique can be:

    1. Make the selection in the source image
    2. Select>To path
    3. Copy the path to the target image, by dragging it from the Paths list of the source to the canvas of the target
    4. On the target image, upscale the path (use the Scale tool in "Path" mode: 3rd icon in the Transform: line of he Tool options)
    5. Select>From path (or Path to selection after right-click on the path preview)
    6. Sample the area color in the source image
    7. Bucket-fill the selection in the target.