>Suppose we have a standard QR code composed of hundreds of squares and 
>their hundreds of square corners. (e.g., 

>How can I get Gimp to round all of the internal and external square 
>corners - let's say to a 10 pixel radius?

>Thank you.

Using an example image found on the page indicated above 
(http://upload.wikimedia.org/wikipedia/commons/a/a6/Qr-4.svg) I imported the 
image into GiMP 2.6.x.  (The latest version available to me as a CentOS user)

I imported it at 5x the original size (1100x1100) so that I could manipulate 
details as needed with less quality loss.

I did a Select -> By Color, then selected any of the black.  All black areas 
are selected while the transparent areas are not.

I then did a Select -> Shrink... and set the pixel value to 5.  Note that the 
selection is already rounding the corners, but now the selected area is too 

Next I did a "Select -> Grow... and set the pixel value to 5.  Now the 
selection is back to where it was but the corners are now more rounded though 
not quite what I think you want in terms of accuracy.

So next, I go to the layers panel and into the paths tab.  I then do a 
"Selection to path"  by clicking the button at the bottom of that tab. 
(Highlight the buttons to see what their function name/description is)  Now 
there should exist a path with rounded corners added to your paths list.  Go 
ahead and make it visible by clicking the little eye to the left of the path 
item in the list.  (Not needed but makes the path visible so you can see what 
you are working with.)

Now I make the original background layer invisible by clicking the eye to turn 
it off in the layers tab and then add a new transparent layer.  It should be 

Now back to the paths tab and with the rounded QR code path selected, I do a 
"Path to selection" (the opposite of selection to path) to create a new 
selection based on the path with rounded corners.

Now I go to the Bucket fill tool and set the option "Fill whole selection."  I 
can choose any color I want, but black is already selected so that's the one I 
will use.  I click in the selected area to fill in my new selection.

You should now see a QR code with rounded corners.

Now if the corners aren't rounded enough for you, you can play with the pixel 
size when shrinking and growing the initial seleciton.  The effect will be the 
same but with more roundness if you choose a larger number or less if you 
choose a smaller number.

Hope this was helpful.

erroneus (via gimpusers.com)
gimp-user-list mailing list

Reply via email to